Private Declare Function FindWindow Lib "user32 Alias" _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As Long As String)
Private Declare Function FindWindowEx Lib "user32 Alias" _
"FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As Long As String)
Private Declare Function ShowWindow Lib "user32" _
(ByVal HWND As Long, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click ()
Dim OurParent As Long
Dim OurHandle As Long
OurParent=FindWindow (" Shell_TrayWnd vbNullString)
OurHandle=FindWindowEx (OurParent, 0, "Button", vbNullString)
ShowWindow OurHandle, 0 'hidden start button
Command1. Enabled=False
Command2. Enabled=True
End Sub
How to perform after don't hide
CodePudding user response:
Use Spy++ start button to contrast the HWND and gain the HWND of your code to see if the same,CodePudding user response:
This code can only supports Windows 2000 and Windows XP, does not support Windows 7, who let you don't understand the principle to know random copy,