If you're looking for finding the way to hide the SIP button here it is!
1. We start with the API support:
======================
Imports System.Runtime.InteropServices
Module FullScreen
#Region " API Declarations "
<DllImport("coredll.dll", SetLastError:=True)> _
Public Function GetCapture() As IntPtr
End Function
<DllImport("aygshell.dll")> _
Private Function SHFullScreen(ByVal hwndRequester As IntPtr, ByVal
dwState As Integer) As Integer
End Function
Public Enum SHFS As Integer
SHOWTASKBAR = &H1
HIDETASKBAR = &H2
SHOWSIPBUTTON = &H4
HIDESIPBUTTON = &H8
SHOWSTARTICON = &H10
HIDESTARTICON = &H20
End Enum
#End Region
Public Sub SetFullScreen(ByVal hwnd As IntPtr, ByVal dwState As Integer)
Dim rtn As Integer
rtn = SHFullScreen(hwnd, dwState)
End Sub
End Module
==============
2. Add this sub to your form's code to call the API function:
=====================
Private Sub HideSIPButton()
Capture = True
Dim hWnd As IntPtr = GetCapture()
Capture = False
SetFullScreen(hWnd, SHFS.HIDESIPBUTTON)
End Sub
=====================
3. Assuming you have already added a menu bar added to your form, you need
to set the Menu property to "None". (Note: Make sure that your menu items
are all set up & coded first).
4. Now assign the Menu property in code to your form's Form_Load event.
================
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Initialize system.
Me.Menu = Me.mnuMain
End Sub
================
5. Finally, call the HideSipButton() subroutine in your form's Form_Paint
event.
=================
Private Sub frmMain_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
HideSIPButton()
End Sub
=================
Start your project and no SIP button in the menu bar.
6. Finally, if one of your menu items opens another form you are limited to
using the ShowDialog method but at least this works.
=================
Private Sub mnuMainAbout_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuMainAbout.Click
Me.Menu = Nothing
Dim frm As New frmAbout
frm.ShowDialog()
Me.Menu = Me.mnuMain
End Sub
=================
Voila!