My windows form starts like this:
[STAThread]
static void Main()
{
My_App ma = new My_App();
Application.Run(ma);
}
When I get into the "ma" class, I check to see if the user is online. If he is not, I just need to kill the whole app. However, I'm having trouble killing the main form from my "ma" class, so the user just sees a blank form on the screen. Any ideas
thanks for any help.

How to kill application?
Lepsik
hmm, not sure we are thinking the same thing...
I have no problem killing the ma class, it's the main form that calls the ma class I'm having trouble killing.
The ma class checks if the user is online. If he is not online, the ma class does a this.close() and then a blank form opens up, which is the main form that originally called the ma class. I've also tried Application.Exit with the same results.
_Rob_
Should work when you call ma.Close()
are you calling Application.Run(someOtherForm) any where else on the app
Zeeina
To kill an application:
Application.Exit();
you could also do this.Close(); which would close a form
you could also raise an event in ma to alert/notify the caller to close the ma instance which would probably be a better and best practice I believe :)
Richard Drysdall
RCR