How to remove SIP from PPC form?
Hi,
I am writing a PPC app and do not have a SIP (InputPanel) on the form at all. But at runtime, it is available on all of my forms in the menubar. The user can bring it up by just clicking on it. How can I remove this?
I wrote my own input method (a 12-key keypad) and I do not want the user to ever be able to use the keyboard.
Any info will be greatly appreicated!
Thanks,
Corey
Re: How to remove SIP from PPC form?
Hi,
if you get rid of the menubar, then that gets rid of the SIP.
Do you need the menu bar?
Pete
Re: How to remove SIP from PPC form?
Thank you for your reply.
Yes, I do need the menubar. Is there a way to get rid of it and keep the menubar?
Thanks for your help thus far!
-Corey
Re: How to remove SIP from PPC form?
Hi,
Not tried this - found it on opennetcf
<DllImport("coredll.dll", EntryPoint:="GetForegroundWindow", SetLastError:=True)> Private Shared Function GetForegroundWindow() As IntPtr
End Function
<DllImport("aygshell.dll", EntryPoint:="SHFullScreen", SetLastError:=True)> Private Shared Function SHFullScreen(ByVal hwndRequester As IntPtr, ByVal dwState As Integer) As Boolean
End Function
<DllImport("coredll.dll", EntryPoint:="EnableWindow")> Private Shared Function EnableWindow(ByVal hwnd As IntPtr, ByVal bEnable As Boolean) As Boolean
End Function
<DllImport("coredll.dll", EntryPoint:="FindWindow")> Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
Private Const SHFS_SHOWSTARTICON As Integer = &H10
Private Const SHFS_HIDESTARTICON As Integer = &H20
Private Const SHFS_HIDESIPBUTTON As Integer = &H8
Private Const SHFS_SHOWSIPBUTTON As Integer = &H4
Private Const SHFS_SHOWTASKBAR As Integer = &H1
Private Const SHFS_HIDETASKBAR As Integer = &H2
Private Shared Function SetSIPVisible(ByVal visible As Boolean) As Boolean
Dim hwnd As IntPtr = GetForegroundWindow()
If Not hwnd.Equals(IntPtr.Zero) Then
If visible Then
Return SHFullScreen(hwnd, SHFS_HIDESIPBUTTON)
Else
Return SHFullScreen(hwnd, SHFS_HIDESIPBUTTON)
End If
End If
End Function
Pete
Re: How to remove SIP from PPC form?
Hey, thanks so much for finding this! I also needed a way to hide the start button for a different reason, so this solves two problems!
Again, thank you... I'll let you know how it works out.
-Corey