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

📄 frmdrag.frm

📁 个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDrag 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Icon View"
   ClientHeight    =   2910
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2910
   ScaleWidth      =   5775
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdExit 
      Caption         =   "E&xit"
      Height          =   315
      Left            =   4500
      TabIndex        =   6
      Top             =   2280
      Width           =   1035
   End
   Begin VB.CommandButton cmdMode 
      Caption         =   "&Manual"
      Height          =   315
      Left            =   2940
      TabIndex        =   5
      Top             =   2280
      Width           =   1035
   End
   Begin VB.PictureBox picClear 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   615
      Left            =   1500
      Picture         =   "frmDrag.frx":0000
      ScaleHeight     =   615
      ScaleWidth      =   675
      TabIndex        =   4
      Top             =   1860
      Width           =   675
   End
   Begin VB.PictureBox picIcon 
      DragIcon        =   "frmDrag.frx":0442
      Height          =   615
      Left            =   120
      ScaleHeight     =   555
      ScaleWidth      =   615
      TabIndex        =   3
      Top             =   1860
      Width           =   675
   End
   Begin VB.DriveListBox drivList 
      Height          =   300
      Left            =   2820
      TabIndex        =   2
      Top             =   1740
      Width           =   2835
   End
   Begin VB.DirListBox DirList 
      Height          =   1350
      Left            =   2820
      TabIndex        =   1
      Top             =   120
      Width           =   2835
   End
   Begin VB.FileListBox FileList 
      DragIcon        =   "frmDrag.frx":0884
      Height          =   1350
      Left            =   120
      Pattern         =   "*.ico"
      TabIndex        =   0
      Tag             =   "fileList"
      Top             =   120
      Width           =   2535
   End
End
Attribute VB_Name = "frmDrag"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
    End
End Sub

Private Sub cmdMode_Click()
    If cmdMode.Caption = "&Manual" Then
        cmdMode.Caption = "&Automatic"
        picIcon.DragMode = vbAutomatic
    Else
        cmdMode.Caption = "&Manual"
        picIcon.DragMode = vbManual
    End If
End Sub

Private Sub DirList_Change()
    FileList.Path = DirList.Path
    ChDir FileList.Path
    FileList.SetFocus
End Sub

Private Sub drivList_Change()
    DirList.Path = drivList.Drive
End Sub

Private Sub FileList_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    FileList.Drag vbBeginDrag
End Sub

Private Sub picClear_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
    Source.Drag vbEndDrag
    picIcon.Picture = LoadPicture()
End Sub

Private Sub picIcon_DragDrop(Source As Control, X As Single, Y As Single)
    If Source.Tag = "fileList" And Source.List(Source.ListIndex) <> "" Then
        picIcon.Picture = LoadPicture(DirList & "\" & Source.List(Source.ListIndex))
    End If
    picIcon.DragIcon = picIcon.Picture
End Sub

⌨️ 快捷键说明

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