FormClosing Event
See Also 
SourceCode.Workflow.WizardFramework.Authentication Namespace > CredentialsDialog Class : FormClosing Event



Glossary Item Box

Syntax

Visual Basic (Declaration)  
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Occurs whenever the user closes the form, before the form has been closed and specifies the close reason.")>
Public Event FormClosing As FormClosingEventHandler
Visual Basic (Usage) Copy Code
Dim instance As CredentialsDialog
Dim handler As FormClosingEventHandler
 
AddHandler instance.FormClosing, handler
C#  
[SRCategory("Behavior")]
[SRDescription("Occurs whenever the user closes the form, before the form has been closed and specifies the close reason.")]
public event FormClosingEventHandler FormClosing
C++/CLI  
[SRCategory("Behavior")]
[SRDescription("Occurs whenever the user closes the form, before the form has been closed and specifies the close reason.")]
public:
event FormClosingEventHandler^ FormClosing

Event Data

The event handler receives an argument of type FormClosingEventArgs containing data related to this event. The following FormClosingEventArgs properties provide information specific to this event.

Property Description
Cancel (Inherited from System.ComponentModel.CancelEventArgs)  
CloseReason Gets a value that indicates why the form is being closed.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also