一只萌萌小番薯
给你一个很简单的API 参数简单,用起来简单。。第一个:FindWindow 用来找到窗口句柄。第二个:MoveWindow 用来设置窗体坐标及宽高。-------------------------------------分割线---------------------------------------exmple:窗体标题:Test具体实现' API调用声明Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long'API调用声明Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, _ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, _ByVal bRepaint As Long) As LongPrivate sub Command_Click()Dim HW as longHW=FindWindow(VBNULLSTRING,"Test")MoveWindow HW,0,0,200,300 ' 将该窗口X变为200 ,Y变为300