32.23 How can I detect if the user clicks into another window from my modal dialog?


Use the Form.Deactivate event:

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

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


(from sburke_online@microsoft..nospam..com on microsoft.public.dotnet.framework.windowsforms)

© 2001-2010 Copyright Syncfusion Inc. All rights reserved.  |  Privacy Policy  |  Contact  |  Sitemap