Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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

0
Posted

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

0

Use the Form.Deactivate event: Deactivate += new EventHandle( OnDeactivate ); // … private void OnDeactivate( object s, EventArgs e ) { Close(); } Shawn Burke, Microsoft, # No product version has been specified for this FAQ item. Please report status updates here. • How do I get an HWND for a form or control? See the Control.Handle property which returns the HWND. Be careful if you pass this handle to some Win32 API as Windows Forms controls do their own handle management so they may recreate the handle which would leave this HWND dangling. Shawn Burke, Microsoft, # No product version has been specified for this FAQ item. Please report status updates here. • How do I prevent a form from being shown in the taskbar? You need to set the form’s ShowInTaskbar property to False to prevent it from being displayed in the Windows taskbar. Contributed from George Shepherd’s Windows Forms FAQ, # No product version has been specified for this FAQ item. Please report status updates here. • How do

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123