?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "拖放功能"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Image Image1
Height = 480
Left = 1800
Picture = "Form1.frx":0000
Top = 1320
Width = 480
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim dragx As Single
Dim dragy As Single
Const BEGIN_DRAG = 1
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
'Sourse為被拖動(dòng)的控件。
'X,Y為鼠標(biāo)所在目標(biāo)窗體或控件的當(dāng)前坐標(biāo)。
Image1.Picture = Source
Form2.Image1.Picture = LoadPicture("")
Image1.Move (X - dragx), (Y - dragy)
End Sub
Private Sub Form_Load()
Load Form2
Form2.Show 0
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
dragx = X
dragy = Y
Image1.Drag BEGIN_DRAG '開始拖動(dòng)操作
Image1.DragIcon = LoadPicture(App.Path + "\Winupd.ico")
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -