MyProgramIs A Wm full screen program that runs automatically upon startup. I have shielded all PDA buttons (except power keys), that is, the user cannot exit my program. But when the user shuts down (long press the power button), it will pop up "..., whether to shut down the dialog box, which will display the "Start" menu. If a user clicks any item in the Start Menu, he will jump out of my program.
I always thought this function could not be implemented, but when I played a full-screen RPG Game one day, I found that after I pressed the shut-down key, I clicked the "Start" and didn't respond, so I wanted to implement this function.
How can I prevent users from clicking the Start menu?
In the Windows Mobile section of msdn: http://social.microsoft.com/Forums/zh-CN/1729/thread/3b2495d5-a4a5-43b8-9080-242e1e3514cc
Windows Mobile in csdn: http://topic.csdn.net/u/20090702/11/e6417a27-30fe-469e-9977-bc219d028ff5.html
I have asked this question, and I have read a lot of Chinese characters. I cannot find a proper solution in English documents. Please help me.
Again, it indicates profit.
Finally, thank you.
Change Certificate ----------------------------------------------------------------------------------------------------------------------------------------------
According to a few friends on csdn, there are two solutions:
Two solutions:
1. If you can intercept messages by pressing the power key, you can directly hide the hhtaskbar.
[Dllimport ( " Coredll. dll " )]
Public Extern Static Intptr findwindow ( String Lpclassname, String Lpwindowname );
[Dllimport ("Coredll. dll")]
Public Extern Static BoolEnablewindow (intptr hwnd,BoolBenable );
Public Static Bool Hidebar ( Bool Enable)
{
Intptr hwnd;
Hwnd = Findwindow ( " Hhtaskbar " , "" );
Return Enablewindow (hwnd, enable );
}
Public Form1 ()
{
Initializecomponent ();
Hidebar ( False );
}
2. The service program intercepts the message at the position where the user clicks start and directly break it to block it.
Lresult wndproc (hwnd, uint nmessage, wparam, lparam)
{
Switch (Nmessage)
{
Case Wm_lbuttondown:
MessageBox (null, _ T ( " Small, just escape " ), _ T ( " Tip " ), Mb_ OK );
Return 0 ;
}
Return Defwindowproc (hwnd, nmessage, wparam, lparam );
}
VoidCevcdlg: onbutton1 ()
{
Hwnd=: Findwindow (text ("Hhtaskbar"), Text (""));
If(Hwnd! =Null)
{
Setwindowlong (hwnd, gwl_wndproc ,(Long) Wndproc );
}
}