你测试一下这个
Declare Function ReleaseCapture Lib "user32" () As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Sub MovingHandle_MouseDown(Button ...)
If (Button = 1) And (Me.WindowState = 0) Then
*******.MousePointer = 15
ReleaseCapture
SendMessage Me.Hwnd, &H112, &HF010& + 2, 0
*******..MousePointer = 0
End If
Option Explicit
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)
Private Const htcaption = 2
Private Const wm_nclbuttondown = &HA1
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i, r
If Button = 1 Then
i = ReleaseCapture()
r = SendMessage(hwnd, wm_nclbuttondown, htcaption, 0)
End If
End Sub
加上这段代码就可以移动了

是不是还要把你这代码做一些修改?其实我都看不懂你这代码
俺是个刚学的菜鸟!我把原码发上来,你可不可以帮我把这段代码加进去?谢谢了!另外还有个问题,当设成无边框的时候电脑下面的任务栏里也没有相应的任务!这又是怎么回事?[此贴子已经被作者于2007-7-23 18:31:27编辑过]
