How to activate main form

  • Thread starter Thread starter Janez
  • Start date Start date
J

Janez

Hi,

I have the following problem with CF application:
1. I start application with two forms from File explorer, form1 is
displayed initially.
2. I open form2 modally from form1, so form2 is on top of the form1.
3. Now I go back to File explorer through Start menu. My application
is now hidden, but still running.
4. I tap on my application in file explorer so the application is
brought back to front again, modal form2 is active form.
5. Now I close modal form2 and there is the problem; I want form1 to
be activated, but File explorer becomes active, so I need to minimize
File explorer to activate Form1.

Any solution to this?

I am using Pocket PC 2002 and CF 1.0 SP2.

Regards
Janez
 
You could bring the focus to form1 right after form2.ShowModal() is
called... This way once the thread that has created ShowModal returns, the
next thing it does it to activate and bring your caller to the front.

HTH

Dan.
 
Back
Top