Click here to Skip to main content
16,005,734 members
Home / Discussions / C#
   

C#

 
GeneralRe: Closing a form :) Pin
Cristoff30-Jul-04 22:30
Cristoff30-Jul-04 22:30 
GeneralRe: Closing a form :) Pin
Roman Rodov1-Aug-04 14:21
Roman Rodov1-Aug-04 14:21 
GeneralRe: Closing a form :) Pin
Cristoff30-Jul-04 22:23
Cristoff30-Jul-04 22:23 
GeneralRe: Closing a form :) Pin
Heath Stewart30-Jul-04 23:23
protectorHeath Stewart30-Jul-04 23:23 
GeneralRe: Closing a form :) Pin
Cristoff31-Jul-04 0:45
Cristoff31-Jul-04 0:45 
GeneralRe: Closing a form :) Pin
Heath Stewart31-Jul-04 4:48
protectorHeath Stewart31-Jul-04 4:48 
GeneralRe: Closing a form :) Pin
Cristoff31-Jul-04 19:44
Cristoff31-Jul-04 19:44 
GeneralRe: Closing a form :) Pin
Heath Stewart1-Aug-04 5:44
protectorHeath Stewart1-Aug-04 5:44 
Yes, that is the way to handle it. Form.Close will send the Windows messages to close the Form. You're handling the WM_CLOSING message and optionally cancelling it. If you don't, the Form continues to close. When it's closed, if the message pump was waiting on it (i.e., you passed an instance of that Form to Application.Run), then the application will exit.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Closing a form :) Pin
mikker_1231-Aug-04 14:35
mikker_1231-Aug-04 14:35 
GeneralVisual Styles Pin
eggie530-Jul-04 19:26
eggie530-Jul-04 19:26 
GeneralRe: Visual Styles Pin
Heath Stewart30-Jul-04 23:20
protectorHeath Stewart30-Jul-04 23:20 
GeneralWant to make a good C# window Application Pin
softp_vc30-Jul-04 17:33
softp_vc30-Jul-04 17:33 
GeneralRe: Want to make a good C# window Application Pin
Heath Stewart30-Jul-04 19:10
protectorHeath Stewart30-Jul-04 19:10 
GeneralRe: Want to make a good C# window Application Pin
softp_vc1-Aug-04 17:48
softp_vc1-Aug-04 17:48 
GeneralRe: Want to make a good C# window Application Pin
Heath Stewart4-Aug-04 5:00
protectorHeath Stewart4-Aug-04 5:00 
GeneralMenuItem adding and removing at run time Pin
StephenMcAllister30-Jul-04 15:10
StephenMcAllister30-Jul-04 15:10 
GeneralRe: MenuItem adding and removing at run time Pin
Heath Stewart30-Jul-04 19:19
protectorHeath Stewart30-Jul-04 19:19 
GeneralDisabling Mouse wheel scrolling - Scenario Pin
Tristan Rhodes30-Jul-04 14:16
Tristan Rhodes30-Jul-04 14:16 
GeneralRe: Disabling Mouse wheel scrolling - Scenario Pin
Heath Stewart30-Jul-04 19:08
protectorHeath Stewart30-Jul-04 19:08 
GeneralMessage pump exception catching Pin
Hugo Hallman30-Jul-04 13:21
Hugo Hallman30-Jul-04 13:21 
GeneralRe: Message pump exception catching Pin
Heath Stewart30-Jul-04 19:06
protectorHeath Stewart30-Jul-04 19:06 
GeneralApplication displaying Japanese, German, and English text. Pin
jerrycainjr30-Jul-04 12:28
jerrycainjr30-Jul-04 12:28 
GeneralRe: Application displaying Japanese, German, and English text. Pin
Heath Stewart30-Jul-04 12:59
protectorHeath Stewart30-Jul-04 12:59 
GeneralHighlighting a object selected & dynamic resizing Pin
smartyosu30-Jul-04 12:18
smartyosu30-Jul-04 12:18 
Generaltab control problem Pin
blankg30-Jul-04 10:59
blankg30-Jul-04 10:59 

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.