How do I get back to the main form? where's theapp

  • Thread starter Thread starter M
  • Start date Start date
M

M

I used to do this

inline CMyApp* GetApp()
{
extern CMyApp theApp;
return &theApp;
}

I've searched google and cannot find what I'm looking for? A code snippet
would be great

Thanks alot

Best Regards,
 
Maybe you can pass "this" to the second form and use it to return to the
main form when done? Not very pretty, but probably do-able.
 
Michael C said:
Maybe you can pass "this" to the second form and use it to return to the
main form when done? Not very pretty, but probably do-able.

Actually I found the solution

class MainForm
{

public static MainForm Instance
{
get
{
if (MainForm.instance == null)
MainForm.instance = new FCSim.SimScheduler();
return MainForm.instance;
}
}

private static MainForm instance;

}
 
Back
Top