G
Guest
I have a problem closing down the application, i haven't dont much in the
project yet, so it contains a program.cs file (generated by Visual studio)
with the main function. Also my main form, now my problem is that, in afew
places in my mainForm i want to Exit the application and close the probram,
when i try:
Application.Exit();
nothing happens, it keeps running. Then i also tried to add
private void mainForm_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
and called it from one of my funcctions with this:
FormClosedEventArgs mArgs = new
FormClosedEventArgs(CloseReason.ApplicationExitCall);
mainForm_FormClosed(this, mArgs);
but it still continues to run.
All this is in the loading sequence of the form, i am loading alot of
pictures from an resourcefile, when a picture won't load i need to exit the
entire application. Any suggestions?
project yet, so it contains a program.cs file (generated by Visual studio)
with the main function. Also my main form, now my problem is that, in afew
places in my mainForm i want to Exit the application and close the probram,
when i try:
Application.Exit();
nothing happens, it keeps running. Then i also tried to add
private void mainForm_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
and called it from one of my funcctions with this:
FormClosedEventArgs mArgs = new
FormClosedEventArgs(CloseReason.ApplicationExitCall);
mainForm_FormClosed(this, mArgs);
but it still continues to run.
All this is in the loading sequence of the form, i am loading alot of
pictures from an resourcefile, when a picture won't load i need to exit the
entire application. Any suggestions?