Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I detect if the user clicks into another window from a modal dialog?

Use the Form.Deactivate event:

Deactivate += new EventHandle( OnDeactivate ); 
// ... 

private void OnDeactivate( object s, EventArgs e ) 
{ 
  Close(); 
} 

Shawn Burke, Microsoft



Page view counter