|
-
Aug 6th, 2003, 04:58 PM
#4
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.
This disables only the clicking, not the keyboard (Win key).
Has someone helped you? Then you can Rate their helpful post. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|