Bring Application Back To Front in WM5

  • Thread starter Thread starter morris.logan
  • Start date Start date
M

morris.logan

Folks,

I am hoping someone can give me hand with a problem I am having.

I have an application which acts as a wrapper\launcher for another
application.

App1 collects info from the user and is used to control access and
data flows tp app2.

When App2 is launched it is displayed to user, but at times, if the
user closes app2 they are returned to the file explorer or the today
screen in WM5 and not app1 as expected. This appears to happen is the
user changes the configuration of app2 which causes the screen to
redraw itself and while it does this, it shows the last application
which was running, e.g File Explorer etc.

I have tried using BringToFront() and Show() commands when control is
returned to App1 and this has no effect on the problem.

Has any one encountered a problem like this and more importantly how
to work round this? As a footnote, I am working with WM5, VB.Net 2k5
and Compact Framework 2 SP1.

Cheers

Morris
 
Hi,

You can call FindWindow to get the handle of your window, then call
SetForegroundWindow with the handle in parameter. You must import
these functions with dllimport, I don't have the code in VB, but there
are a lot of examples on the Internet.

BR

Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
 
App1 should be running in that case, its probably minimised. In
windows mobile if you try to launch a minimised application, it comes
to foreground. I think you can just launch app1 again using the same
method you used to launch app2.

Hope it helps,

Regards,

Sachin Palewar
(Certified Scrum Master)

Palewar Techno Solutions
(Mobile Solutions for Your Business)
www.palewar.com
 
Back
Top