Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a second form

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have a form that has a button on it labeled Setup. I want to open Form2 when someone clicks on the setup button. Form2 allows the user to declare names and paths and writes that info to an ini file etc.

When Form1 loads in the project, it reads from the ini file.

I am using this:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (Form2->ShowModal() == mrOk)
Close();
}

But I get an error that Form2 is an undefined symbol.

What am I doing wrong?

Thanks

fergmj

 
I did not include the unit header. Now it is fixed. Sorry for the stupidity.

fergmj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top