⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
   VERSION 5.00
   Begin VB.Form aa
      BackColor       =   &H00C0C0C0&
      Caption         =   "拖放应用示例"
      ClientHeight    =   1965
      ClientLeft      =   60
      ClientTop       =   345
      ClientWidth     =   4800
      FillColor       =   &H00C0C0C0&
      BeginProperty Font
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      LinkTopic       =   "Form1"
      MaxButton       =   0   'False
      ScaleHeight     =   1965
      ScaleWidth      =   4800
      StartUpPosition =   2  '屏幕中心
      Begin VB.PictureBox Picture1
         Height          =   1215
         Left            =   2160
         ScaleHeight     =   1155
         ScaleWidth      =   2115
         TabIndex        =   1
         Top             =   480
         Width           =   2175
      End
      Begin VB.Label Label1
         BackStyle       =   0  'Transparent
         BorderStyle     =   1  'Fixed Single
         Caption         =   "No Drag"
         DragMode        =   1  'Automatic
         Height          =   375
         Left            =   360
         TabIndex        =   0
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Image Image1
         Height          =   240
         Left            =   600
         Picture         =   "Form1.frx":0000
         Top             =   480
         Width           =   240
      End
   End
   Attribute VB_Name = "aa"
   Attribute VB_GlobalNameSpace = False
   Attribute VB_Creatable = False
   Attribute VB_PredeclaredId = True
   Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
'##################################################################
'## 过程名称:Image1_MouseDown
'## 参数:Button 为Integer型
'## 参数:Shift 为Integer型
'## 参数:X 为Single型
'## 参数:Y 为Single型
'##################################################################
Private 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
    
'##################################################################
'## 过程名称:Picture1_DragDrop
'## 参数:Source 为Control型
'## 参数:X 为Single型
'## 参数:Y 为Single型
'##################################################################
Private 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
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -