If BringToFront doesn't work try SetForegroundWindow (Peter Foot's blog
entry):
http://blog.opennetcf.org/pfoot/Perm...d-0950e9d16b10
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"Janez" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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