拖放.frm

来自「VB源码,是初学者的福因.让你很快掌握VB编程」· FRM 代码 · 共 53 行

FRM
53
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "DragOver事件窗口"
   ClientHeight    =   1275
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   3240
   LinkTopic       =   "Form1"
   ScaleHeight     =   1275
   ScaleWidth      =   3240
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   495
      Left            =   2040
      ScaleHeight     =   435
      ScaleWidth      =   555
      TabIndex        =   1
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "跟"
      DragMode        =   1  'Automatic
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   255
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
   Label1.Visible = False
   Picture1.BackColor = &H8000000F
End Sub

Private Sub Picture1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
  Picture1.BackColor = vbBlack
End Sub

⌨️ 快捷键说明

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