1.运行时错误'374': 激活控件'VB.UserControl'失败.这个控件可能与您的
Option Explicit
Dim mX As Long, mY As Long
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button And vbLeftButton Then
mX = X: mY = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button And vbLeftButton Then
Me.Move Me.Left - mX + X, Me.Top - mY + Y
End If
End Sub
把form换成要移动的控件名称就可以实现移动了。