Ad

Programmatically Navigating To The Windows Mobile Home Screen

We have an application that downloads some files in the background. Our application pops up when an Internet connection is made, and after prompting the user to accept the downloads, we'd like to switch back to the home screen while we do our stuff.

We can't work out how to do to this. We can emulate pressing "back" a few times, which sometimes works, but where you end up depends on what the user was doing when the Internet connection happened.

So, can someone provide pointers to how to do this?

Thanks.

Paul.

Ad

Answer

Can you try setting the today screen as the foreground window?

HWND hWnd = FindWindow(_T("DesktopExplorerWindow"), _T("Desktop")); SetForegroundWindow(hWnd);

Ad
source: stackoverflow.com
Ad