Greetings all...
In Form1 I have this code in the FormCreate(...) function
and when I run it I get this error message,
the error occures when I'm trying to change an attribute on Form2, why is this so?! I believe it has something to do with the fact that Form2 is not yet created at this point, am I right?! if so, where should I place this code so that it wont happen again?! or should I rewrite it, and place a similar code in Form2s' FormCreate(...)??
thanks for any help... My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
In Form1 I have this code in the FormCreate(...) function
Code:
try
{
// Clear and set new attributes on Form 1
Form1->btnSend->Caption = "Send";
Form1->txtServerWin->Lines->Clear();
Form1->txtClientWin->Lines->Clear();
// Clear and set new attributes on Form 2
Form2->lstConnected->Items->Clear();
Form2->lstConnected->Items->Clear();
Form2->txtUser->Clear();
Form2->txtEmail->Clear();
Form2->txtName->Clear();
Form2->txtWeb->Clear();
Form2->txtPassword->Clear();
Form2->txtPort->Text="8800";
}
catch(...)
{ // if (for any reason) we are unable to change ny of these
// attributes return a zero ('0')
return 0;
}
return 1;
Code:
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0040169D. Read of address 000002DC'. Process stopped. Use Step or Run to continue
the error occures when I'm trying to change an attribute on Form2, why is this so?! I believe it has something to do with the fact that Form2 is not yet created at this point, am I right?! if so, where should I place this code so that it wont happen again?! or should I rewrite it, and place a similar code in Form2s' FormCreate(...)??
thanks for any help... My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work