Public Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Public 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 Public Declare Function ShowWindow Lib "user32" _ (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Sub HideStartButton() Dim Handle As Long, FindClass As Long FindClass& = FindWindow("Shell_TrayWnd", "") Handle& = FindWindowEx(FindClass&, 0, "Button", vbNullString) ShowWindow Handle&, 0 End Sub Sub ShowStartButton() Dim Handle As Long, FindClass As Long FindClass& = FindWindow("Shell_TrayWnd", "") Handle& = FindWindowEx(FindClass&, 0, "Button", vbNullString) ShowWindow Handle&, 1 End Sub 'Copiare questo codice nel Form Private Sub Command1_Click() HideStartButton End Sub Private Sub Command2_Click() ShowStartButton End Sub Creare un Form due Command ed un Modulo |