这个程序,用户定义类型如何定义?
这个程序,用户定义类型如何定义?这个程序是通过API的方法,最小化窗口。用于操作第三方程序的最大化、最小化、还原?
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
Dim hwnd As Long, Thwnd As Long
Shell "notepad.exe", 1 '打开一个记事本
hwnd = FindWindow("Notepad", "无标题 - 记事本") '得到记事本句柄
SetWindowPlacement hwnd, 2
End Sub
[此贴子已经被作者于2023-2-9 15:15编辑过]