How to disable Start button by editing registry settings?

G

Guest

Hi,
I have to develop a full screen application (without TitleBar and Control
Box). Using the following code, it is possible.
Me.WindowState = FormWindowState.Maximized
Me.FormBorderStyle = FormBorderStyle.None
Me.ControlBox = False
Me.Menu = Nothing
But if I wants a SIP, then I have to comment the fourth line, i.e., Me.Menu
= Nothing
Then the SIP will be there, but the Titlebar also appers. And the user can
switch over to another application by clicking the Start Button.

My question is, how we can disable the Titlebar(Start button) and enable the
SIP simultaneously?

I have disabled the clock by editing the registry using:
HKEY_LOCAL_MACHINE\Software\Microsoft\Clock\
Value: AppState
Data: 11 to enable, 30 to disable

Is there any similar way to disable the Start Button?

Thanks in Advance,
Regards,
Hari
 
A

Alex Feinman [MVP]

Coincidentally I had to solve the same problem today for my own application.
The solution is to do the following:

1) Form properties:
maximized, no control box, no maximize box, no minimize box.

2) in Activate event handler call:
public static void SetFullScreen(Form frm, bool bFullScreen)
{
IntPtr hWnd = GetHandle(frm);
SHFullScreen(hWnd, bFullScreen? (SHFS_SHOWSIPBUTTON|SHFS_HIDESTARTICON)
: (SHFS_SHOWSTARTICON|SHFS_SHOWTASKBAR));
}

private const int SHFS_SHOWTASKBAR = 1;
private const int SHFS_HIDETASKBAR = 2;
private const int SHFS_SHOWSIPBUTTON = 4;

private const int SHFS_HIDESIPBUTTON = 8;

private const int SHFS_SHOWSTARTICON = 0x10;

private const int SHFS_HIDESTARTICON = 0x20;

[DllImport("aygshell.dll")]

private static extern int SHFullScreen(IntPtr hWnd, int dwState);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top