【VB开源代码栏目提醒】:网学会员VB开源代码为您提供Ex13_12.frm参考,解决您在Ex13_12.frm学习中工作中的难题,参考学习。
VERSION 5.00
Begin VB.Form Ex13_12
Caption = "拖放图片"
ClientHeight = 2730
ClientLeft = 60
ClientTop = 450
ClientWidth = 4875
LinkTopic = "Form1"
ScaleHeight = 2730
ScaleWidth = 4875
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture2
Height = 1935
Left = 2640
ScaleHeight = 1875
ScaleWidth = 1635
TabIndex = 1
Top = 120
Width = 1695
End
Begin VB.PictureBox Picture1
Height = 2295
Left = 360
Picture = "Ex13_12.frx":0000
ScaleHeight = 2235
ScaleWidth = 1875
TabIndex = 0
Top = 120
Width = 1935
End
End
Attribute
VB_Name = "Ex13_12"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Picture1.DragMode = 1 '自动拖放
End Sub
Private Sub Picture2_DragDrop(Source As Control, X As Single, Y As Single)
If TypeOf Source Is PictureBox Then '判断源对象是否为图片框
Picture2.Picture = Source.Picture
End If
End Sub