eriksv88
eriksv88

Reputation: 3528

How can I disable the start menu in Windows Mobile 6.1

how can I disable the start menu! Or completely shut down the entire "explorer" in Windows Windows Mobile 6.1, so that users can not go out of my program.

I have try http://pastebin.com/yz6WN6xa , but then Windows Mobile 6.1 hang.

Upvotes: 0

Views: 4027

Answers (3)

arc
arc

Reputation: 811

The following will temporarily hide the start button while the application is running, please note that if the application crashes you will need to ensure that the HardwareStartKeyEnabled flag is set back to 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);
    }
}

Upvotes: 0

eriksv88
eriksv88

Reputation: 3528

I found out about it myself!

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

End Class

Then I call the class as follows:

TaskBoard.ShowWindow(TaskBoard.FindWindow("HHTaskBar", Nothing), 0)

Upvotes: 1

Patrick
Patrick

Reputation: 17973

I think the closest you can get is setting ControlBox = false and having no menu, i.e. Menu = null in your Form. It depends on what version your client is running.. This will have more effect on Windows CE 6.5.

Form.ControlBox disables the "X" button and having a null Form.Menu makes your application "full screen", as no buttons will show.

Upvotes: 0

Related Questions