請問高手們,第一次點圖片拖曳到一個地方,第二次點圖片可開起檔案。<br>可以教教我嗎?<br>
一般宣告 Dim MsX Dim MsY Dim xx Dim yy Private Sub stat1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) MsX = X '設定mouse X=msx MsY = Y '設定mouse Y=msy If Button = 1 Then '當按下滑鼠左鍵時 ' '看你要做啥~ ' End If End Sub Private Sub stat1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) xx = MsX + X - MsX '設定 XX等於mouse移動後的X yy = MsY + Y - MsY '設定 YY等於mouse移動後的X '當滑鼠右鍵按下拖曳時讓物件移到目前座標 If Button = 2 Then stat1.Move stat1.Left + xx, stat1.Top + yy End Sub