Loose of Focus

  • Thread starter Thread starter aod
  • Start date Start date
A

aod

We are working on CE 5.0 with .Net compact framework 1.1.

From our main form, we use a dialog using ShowDialog, once the user has
clicked on the "X" and closes that dialog, the focus does not return to the
main form...

We've even added some code to return control by calling BringToFront on the
form to return control.

Anyone has an idea?
 
Hi,

Try to call the following function in the closed event of your second
Form :

[DllImport("coredll.dll")]
internal static extern int SetForegroundWindow(IntPtr hWnd);

--> SetForegroundWindow(this.Handle);

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
 
Back
Top