代码之家  ›  专栏  ›  技术社区  ›  eriksv88

如何禁用Windows Mobile 6.1中的“开始”菜单

  •  0
  • eriksv88  · 技术社区  · 16 年前

    如何禁用“开始”菜单!或者完全关闭WindowsMobile6.1中的整个“资源管理器”,这样用户就不能离开我的程序。

    我试过了 http://pastebin.com/yz6WN6xa ,但Windows Mobile 6.1挂起。

    3 回复  |  直到 13 年前
        1
  •  1
  •   eriksv88    16 年前

    我自己发现的!

    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)
    
        2
  •  0
  •   Patrick angularsen    16 年前

    我认为你能得到的最接近的是设置 ControlBox = false 没有菜单,也就是说。 Menu = null 以你的形式。这取决于您的客户机运行的版本。这将对Windows CE 6.5产生更大的影响。

    Form.ControlBox 禁用“X”按钮并具有 null Form.Menu 使您的应用程序“全屏”,因为不会显示任何按钮。

        3
  •  0
  •   arc    13 年前

    以下内容将在应用程序运行时暂时隐藏“开始”按钮,请注意,如果应用程序崩溃,则需要确保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);
        }
    }
    
    推荐文章