Crea un modulo e inserisci
codice:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Const SW_HIDE = 0
Const SW_SHOW = 5
Const GW_CHILD = 5
Sub HideDesktop(ByVal Hidden As Boolean)
Dim hwnd_Desktop As Long
hwnd_Desktop = GetWindow(FindWindow("Progman", "Program manager"), GW_CHILD)
If Hidden Then
ShowWindow hwnd_Desktop, SW_HIDE
Else
ShowWindow hwnd_Desktop, SW_SHOW
End If
End Sub
sub HideStartBar(ByVal Hidden As Boolean)
Dim hwnd_StartBar As Long
hwnd_StartBar = FindWindow("Shell_TrayWnd", "")
If Hidden Then
ShowWindow hwnd_StartBar, SW_HIDE
Else
ShowWindow hwnd_StartBar, SW_SHOW
End If
End Sub
poi crei nel programma,ad esempio all'avvio del form, una riga del tipo:
codice:
HideDesktop (True)
ps questo ti nasconde anche la barra dello start
Fammi sapere