'窗口移动API Private Declare Function ReleaseCapture Lib "user32" () As Long Private Declare Function SendMessage Lib "user32" Alias _ "SendMessageA" (ByVal hwnd As Long,ByVal _ wMsg As Long,ByVal wParam As Long,_ lParam As Any) As Long Private Const WM_SYSCOMMAND = &H112 Private Const SC_MOVE = &HF010& Private Const WM_NCLBUTTONDOWN = &HA1 Private Const HTCAPTION = 2 Private Sub command1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) ReleaseCapture SendMessage hwnd,WM_NCLBUTTONDOWN,HTCAPTION,0& End Sub