Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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()
myval = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, 3)
End Sub