是否有窗体上可以拖动的控件,如标签可以拖动吗
比较有用
是在运行中可以拖动
[解决办法]
可用鼠标拖动:
Option Explicit
Dim cx As Long, cy As Long
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move X - cx, Y - cy
End Sub
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Drag 1
cx = X
cy = Y
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Drag 2
End Sub
[解决办法]
建议从:
http://www.china-askpro.com/download/formdsgn.zip
下载源程序研究一下,这个程序可以很好的解决你的问题,只是代码长了点,慢慢看吧,你会有收获的:)