Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub Command1_Click()
Dim WindowHandle As Long
WindowHandle = FindWindow(vbNullString, "data:, - Google chrome") 'QQ2009 改为你的窗体的标题 SetWindowPos WindowHandle, -1, 0, 0, 2000, 2000, &H40 '2000,2000 是你要设置窗口的大小 End Sub
SetWindowPos WindowHandle, 0, 0, 0, 350, 350, &H40 '2000,2000
End Sub
转载声明:本站发布文章及版权归原作者所有,转载本站文章请注明文章来源!