VB应用程序中如何实现窗体的简易移动 如果你的窗体不需要标题栏，又希望能移动它，像WinAmp一样，有个简易移动，我们可以利用以下代码实现： Declare Function ReleaseCapture Lib "user32" () As Long Declare Function SendMessage Lib "user32" Alias "Send-MessageA" (ByVal hwnd As Long, ByVal wMsg As Long,ByVal w Param As Long,lParam As Any) As Long
Public Const HTCAPTION = 2
Public Const WM_NCLBUTTONDOWN = &&HA1
下面是将功能加入窗体的MouseDowm事件中，你也可将其加入其它控件的事件中：
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'以下二行代码可加入各控件的MouseDown之中
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&&

(韩静)