Click here to Skip to main content
15,914,417 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 8:39
Member 967-Jan-05 8:39 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 9:09
protectorHeath Stewart7-Jan-05 9:09 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 9:29
Member 967-Jan-05 9:29 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 11:38
protectorHeath Stewart7-Jan-05 11:38 
GeneralApplication.Exit Pin
pcJuice6-Jan-05 7:42
pcJuice6-Jan-05 7:42 
GeneralRe: Application.Exit Pin
Nick Parker6-Jan-05 7:56
protectorNick Parker6-Jan-05 7:56 
GeneralRe: Application.Exit Pin
pcJuice6-Jan-05 8:01
pcJuice6-Jan-05 8:01 
GeneralRe: Application.Exit Pin
Adam Goossens7-Jan-05 0:55
Adam Goossens7-Jan-05 0:55 
You could keep a list of the forms that are open and create a handler that is assigned to every form's Form.Closed event. This handler then iterates over your list of forms and closes each form in succession (via a call to Form.Close()). Of course you would have to skip over the form that was already closed.

Once that is done you could then just call Application.Exit() as per normal.

Actually, thinking about it: this is a good candidate for an ApplicationContext. Have a look at the example on the ApplicationContext Overview page in your SDK (the example isn't on the MSDN page, sadly), that example is similar to what you want. It could be easily extended.

This space for rent!
My Blog
GeneralRe: Application.Exit Pin
Adam Goossens7-Jan-05 1:21
Adam Goossens7-Jan-05 1:21 
GeneralRe: Application.Exit Pin
pcJuice7-Jan-05 13:51
pcJuice7-Jan-05 13:51 
QuestionHow much exception handling is to much? Pin
KevinMac6-Jan-05 6:26
KevinMac6-Jan-05 6:26 
AnswerRe: How much exception handling is to much? Pin
Andy Brummer6-Jan-05 7:57
sitebuilderAndy Brummer6-Jan-05 7:57 
GeneralRe: How much exception handling is to much? Pin
Heath Stewart6-Jan-05 13:52
protectorHeath Stewart6-Jan-05 13:52 
GeneralRe: How much exception handling is to much? Pin
Andy Brummer6-Jan-05 16:06
sitebuilderAndy Brummer6-Jan-05 16:06 
GeneralAnother C to c# help.... Pin
Blubbo6-Jan-05 5:48
Blubbo6-Jan-05 5:48 
GeneralRe: Another C to c# help.... Pin
Heath Stewart6-Jan-05 13:41
protectorHeath Stewart6-Jan-05 13:41 
GeneralDisabled Button still accepts presses Pin
mikey_g6-Jan-05 5:45
mikey_g6-Jan-05 5:45 
GeneralRe: Disabled Button still accepts presses Pin
Nick Parker6-Jan-05 7:04
protectorNick Parker6-Jan-05 7:04 
GeneralRe: Disabled Button still accepts presses Pin
mikey_g6-Jan-05 23:33
mikey_g6-Jan-05 23:33 
GeneralXML Bulk Loader (SQLXML 3.0) Pin
exhaulted6-Jan-05 3:43
exhaulted6-Jan-05 3:43 
GeneralRe: XML Bulk Loader (SQLXML 3.0) Pin
perlmunger6-Jan-05 5:37
perlmunger6-Jan-05 5:37 
GeneralInfragistics UltraCalendarInfo control Pin
eliea6-Jan-05 1:45
eliea6-Jan-05 1:45 
GeneralRe: Infragistics UltraCalendarInfo control Pin
Nick Parker6-Jan-05 6:50
protectorNick Parker6-Jan-05 6:50 
Generalmodifying xml field data's using c# Pin
dhol6-Jan-05 1:42
dhol6-Jan-05 1:42 
GeneralRe: modifying xml field data's using c# Pin
perlmunger6-Jan-05 5:43
perlmunger6-Jan-05 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.