[英]How can I disable the start menu in Windows Mobile 6.1
如何禁用開始菜單! 或完全關閉Windows Windows Mobile 6.1中的整個“資源管理器”,以使用戶無法退出我的程序。
我嘗試使用http://pastebin.com/yz6WN6xa ,但隨后Windows Mobile 6.1掛起。
我自己發現了!
Public Class TaskBoard
<DllImport("coredll.dll")> _
Public Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
<DllImport("coredll.dll")> _
Public Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal visible As Integer) As IntPtr
End Function
末級
然后我按如下方式調用該類:
TaskBoard.ShowWindow(TaskBoard.FindWindow("HHTaskBar", Nothing), 0)
在應用程序運行時,以下內容將暫時隱藏啟動按鈕,請注意,如果應用程序崩潰,則需要確保將HardwareStartKeyEnabled標志設置回0。
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[MTAThread]
static void Main()
{
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Shell\BubbleTiles",true).SetValue("HardwareStartKeyEnabled",1);
Application.Run(new Form1());
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Shell\BubbleTiles",true).SetValue("HardwareStartKeyEnabled", 0);
}
}
我認為您可以得到的最接近的結果是將ControlBox = false
設置ControlBox = false
,並且沒有菜單,即Form中的Menu = null
。 這取決於您的客戶端運行的版本。這將對Windows CE 6.5產生更大的影響。
Form.ControlBox禁用“ X”按鈕,而Form.Menu為null
會使您的應用程序“全屏”,因為不會顯示任何按鈕。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.