Loose of Focus

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?
 
F

Fabien

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top