pease be with you
how i can disable the "start menu" ??
thanks
Printable View
pease be with you
how i can disable the "start menu" ??
thanks
This will hide it.
VB Code:
Option Explicit Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Const GW_CHILD = 5 Private Const GW_HWNDNEXT = 2 Private Const SW_HIDE = 0 Private Const SW_SHOW = 5 Private Const GW_HWNDFIRST = 0 Private Const GW_HWNDLAST = 1 Private Const GW_HWNDPREV = 3 Dim fWnd As Long, gWnd As Long, IpClass As String * 250, gClass As Long Private Sub Form_Load() HideWnd End Sub Function ShowWnd() As String fWnd = FindWindow("Shell_TrayWnd", vbNullString) gWnd = GetWindow(fWnd, GW_CHILD) gClass = GetClassName(gWnd, IpClass, 250) IpClass = Left$(IpClass, gClass) If Left$(IpClass, 6) = "Button" Then ShowWindow gWnd, SW_SHOW End If End Function Function HideWnd() As String fWnd = FindWindow("Shell_TrayWnd", vbNullString) gWnd = GetWindow(fWnd, GW_CHILD) gClass = GetClassName(gWnd, IpClass, 250) IpClass = Left$(IpClass, gClass) If Left$(IpClass, 6) = "Button" Then ShowWindow gWnd, SW_HIDE End If End Function Private Sub Form_Unload(Cancel As Integer) ShowWnd End Sub
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Sub Form_Load() ShellTrayWnd = FindWindow("Shell_TrayWnd", vbNullString) Button = FindWindowEx(ShellTrayWnd, 0, "Button", vbNullString) EnableWindow Button, False End Sub
This works on WinNT 4.0 ..... The window classes may be different on later versions.
This disables only the clicking, not the keyboard (Win key).Quote:
Originally posted by Eras3r
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Sub Form_Load() ShellTrayWnd = FindWindow("Shell_TrayWnd", vbNullString) Button = FindWindowEx(ShellTrayWnd, 0, "Button", vbNullString) EnableWindow Button, False End Sub
This works on WinNT 4.0 ..... The window classes may be different on later versions.