VERSION 5.00
Begin VB.Form 拖放应用示例 
   Caption         =   "拖放应用示例"
   ClientHeight    =   2010
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4695
   LinkTopic       =   "Form1"
   MousePointer    =   4  'Icon
   ScaleHeight     =   2010
   ScaleWidth      =   4695
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   1215
      Left            =   2280
      ScaleHeight     =   1155
      ScaleWidth      =   1995
      TabIndex        =   0
      Top             =   360
      Width           =   2055
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Caption         =   "No Drag"
      DragMode        =   1  'Automatic
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   1200
      Width           =   1215
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   720
      Picture         =   "v6j07-18.frx":0000
      Top             =   240
      Width           =   480
   End
End
Attribute VB_Name = "拖放应用示例"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  If Button = 1 Then                          ' 判断是否按下左键
    Image1.DragIcon = Image1.Picture          ' 设置拖动图标
    Image1.Drag 1                             ' 手工启动拖放
  End If
End Sub
Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
  If TypeOf Source Is Image Then                  ' 判断拖动源的类型
    Picture1.Picture = Source.Picture               ' 图像框中装入图形
    Source.Visible = False
  Else
    MsgBox ("Error")
  End If
End Sub

