Whenever My form 1 tries to open form 2 I get this error...
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: Input string was not in a correct format.
What does this mean? Here is the Code I use for opening Form2...
if (TimerValue == 5000)
{
this -> timer1 -> Stop();
TimerValue = 0;
Form2 ^ f2 = gcnew Form2;
f2->Show();
MoviePlay = 1;
StreamWriter^ outFile = gcnew StreamWriter("Movie.txt");
String^ Movie = MoviePlay.ToString();
outFile->Write(Movie);
outFile->Close();
this -> button4 ->Visible = false;
this -> button5 ->Visible = false;
this -> label2 ->Visible = false;
this -> button2 ->Visible = false;
this -> button3 ->Visible = false;
FriendString = File::ReadAllText(".\\Rca13\\Friend.txt");
Friend = System::Convert::ToInt32(FriendString);
if (Friend == 1)
{
this -> pictureBox1 -> Load("RetaliationBackground1_Pony1");
}
if (Friend == 2)
{
this -> pictureBox1 -> Load("RetaliationBackground1_Pony2");
}
if (Friend == 3)
{
this -> pictureBox1 -> Load("RetaliationBackground1_Pony3");
}
if (Friend == 4)
{
this -> pictureBox1 -> Load("RetaliationBackground1_SwagMasta");
}
}
Is there anything that was put into this code causing the errors?