vb窗体的DragDrop事件

来源:百度知道 编辑:UC知道 时间:2024/07/03 14:34:17
Private Sub Form1_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move (X - Source.Width / 2), (Y - Source.Height / 2)
End Sub
我用得image控件 dragmode属性的值也改成1了
可运行的时候就是不会动 我是比着教程做得 一样的啊
高手来帮帮忙

把第一行的1去掉。

Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Move (X - Source.Width / 2), (Y - Source.Height / 2)
End Sub

我试了没问题啊.
你把image的stretch属性设为true