closed messagabox in c# ???
-
hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing
-
hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing
-
it's hard to say, where the problem is, if you don't show the codes. but in my apps, if I call MessageBox.Show(...) and in tray "Close()" or "Application.Exit()", it works.
-
for exam: form A -> Form B -> show messagebox. if message not show, i can closed Form A and B, but message show i not closed form A and B and message. can we control messagebox ? nothing
-
yes, because it's a modal window. http://en.wikipedia.org/wiki/Modal_window[^] MessageBox is a modal window. If you want to control it, then create your own messagebox, then call "Show()", and NOT "ShowDialog()".
-
hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing
Do you have anything in your "disable" menu that minimizes the app if it's in full screen? The way I normally do this, I have to add something on my form_closing event to see if the user is actually minimizing when they hit the x. If they are, I minimize, otherwise I close. You might have something like e.Cancel = true stopping the app from actually shutting down.