Private Sub Form_Load()
Picture1.DragIcon = LoadPicture("E:\vbp\icon\abc.ico")
End Sub
Private Sub From_DragDrop(Source As Control, X As Single, Y As Single)
rem 就是這里程式也沒報錯,但拖動放下后,控制元件并沒跟著拖動的滑鼠移動過來,請看看是什么問題
Source.Move (X - Source.Width / 2), (Y - Source.Height / 2)
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Drag 1
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Drag 2
End Sub
uj5u.com熱心網友回復:
洗掉 Private Sub From_DragDrop(Source As Control, X As Single, Y As Single)使用事件選單重新叫出 Private Sub From_DragDrop(Source As Control, X As Single, Y As Single)
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/72114.html
標籤:VB基礎類
下一篇:請問,win8系統,我做個程式想安裝在 Program Files (x86) 目錄里,該檔案夾允許拷貝檔案,但不能注冊Dll檔案,請問是怎么回事?該怎么辦?謝
