I'm porting .NET application from WM5 to WM6.5. Besides new resolution I noticed different UI behavior for start menu and title bar (caption bar). My application needs to work in kind of kiosk mode where user can't exit application and bypass our authentication. For this purpose on WM5 I was hiding start button and close button. I am using following function:
SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
Hiding buttons kind of works on WM6.5 too, but there is another problem. User can tap on the title bar (menu bar, caption bar - I'm not sure what is proper name for it - the bar on the top of the screen) and get access to Windows Task Manager. See attached screenshot
I cirlced places where user can tap and get out to Task Manager like this:
Any ideas how to disable that interaction? Device is Motorola MC65. Running Windows Mobile 6.5.
So, the final answer is part of an answer posted below:
IntPtr tWnd = FindWindow("HHTaskBar", null);
EnableWindow(tWnd, false);
We just find the HHTaskBar and disable it. It has some downside, but overall does the trick.
You can hide the whole top taskbar and maximize your form:
// the following three lines are p/invoked
IntPtr tWnd = FindWindow("HHTaskBar", null);
EnableWindow(tWnd, false);
ShowWindow(tWnd, SW_HIDE);
// maximize your form
form.Size = new Size(240, 320); // or whatever the device's screen dimensions are
form.WindowState = FormWindowState.Maximized;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With