I've used the following API's to lock/unlock the desktop and the start menu in Windows 98 (i've also hide the taskbar), but if lock it both, when the user double click's on the desktop the Start menu popups!
Anyone has a solution to this?
This is the api's i'm using for you to try:
(you call it like deskicon true etc)
Public Sub deskicon(show As Boolean)
Dim primo As Long
primo = FindWindowEx(0&, 0&, "Progman", vbNullString)
If show = True Then
ShowWindow primo, 5 'show desktop icon
Else
ShowWindow primo, 0 'hide desktop icon
End If
End Sub
Public Sub StartButton(show As Boolean)
Dim primo As Long
Dim ultimo As Long
primo = FindWindow("Shell_TrayWnd", "")
ultimo = FindWindowEx(primo, 0, "Button", vbNullString)
If show = True Then
ShowWindow ultimo, 5 'show start button
Else
ShowWindow ultimo, 0 'hide start button
End If
End Sub
Public Sub taskbar(show As Boolean)
Dim primo As Long
primo = FindWindow("Shell_traywnd", "")
If show = True Then
SetWindowPos primo, 0, 0, 0, 0, 0, &H40 'show taskbar
Else
SetWindowPos primo, 0, 0, 0, 0, 0, &H80 'hide taskbar
End If
End Sub
Anyone has a solution to this?
This is the api's i'm using for you to try:
(you call it like deskicon true etc)
Public Sub deskicon(show As Boolean)
Dim primo As Long
primo = FindWindowEx(0&, 0&, "Progman", vbNullString)
If show = True Then
ShowWindow primo, 5 'show desktop icon
Else
ShowWindow primo, 0 'hide desktop icon
End If
End Sub
Public Sub StartButton(show As Boolean)
Dim primo As Long
Dim ultimo As Long
primo = FindWindow("Shell_TrayWnd", "")
ultimo = FindWindowEx(primo, 0, "Button", vbNullString)
If show = True Then
ShowWindow ultimo, 5 'show start button
Else
ShowWindow ultimo, 0 'hide start button
End If
End Sub
Public Sub taskbar(show As Boolean)
Dim primo As Long
primo = FindWindow("Shell_traywnd", "")
If show = True Then
SetWindowPos primo, 0, 0, 0, 0, 0, &H40 'show taskbar
Else
SetWindowPos primo, 0, 0, 0, 0, 0, &H80 'hide taskbar
End If
End Sub