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

📄 file.frm

📁 不错的一个VB菜单设计 界面和功能都不错
💻 FRM
字号:
VERSION 5.00
Object = "{75D4F148-8785-11D3-93AD-0000832EF44D}#2.0#0"; "FAST2003.ocx"
Object = "{75D4F666-8785-11D3-93AD-0000832EF44D}#3.0#0"; "FAST2006.ocx"
Begin VB.Form frmFile 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "File Operations"
   ClientHeight    =   3480
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4725
   Icon            =   "File.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3480
   ScaleWidth      =   4725
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame fraFrame 
      Caption         =   "Browse for..."
      Height          =   1065
      Index           =   1
      Left            =   90
      TabIndex        =   8
      Top             =   2340
      Width           =   4545
      Begin VB.CommandButton cmdBrowseFor 
         Caption         =   "Browse"
         Height          =   345
         Left            =   120
         TabIndex        =   9
         Top             =   300
         Width           =   1275
      End
      Begin VB.Label lblLabel 
         AutoSize        =   -1  'True
         Height          =   195
         Index           =   2
         Left            =   150
         TabIndex        =   10
         Top             =   690
         Width           =   45
      End
   End
   Begin VB.Frame fraFrame 
      Caption         =   "Copy dialog"
      Height          =   2115
      Index           =   0
      Left            =   90
      TabIndex        =   0
      Top             =   150
      Width           =   4515
      Begin VB.CommandButton cmdCopy 
         Caption         =   "Copy..."
         Height          =   405
         Left            =   2490
         TabIndex        =   5
         Top             =   1530
         Width           =   1875
      End
      Begin VB.TextBox txtSource 
         Height          =   315
         Left            =   180
         TabIndex        =   4
         Top             =   510
         Width           =   3765
      End
      Begin VB.TextBox txtTarget 
         Height          =   315
         Left            =   180
         TabIndex        =   3
         Top             =   1110
         Width           =   3765
      End
      Begin VB.CommandButton cmdBrowse 
         Caption         =   "..."
         Height          =   315
         Index           =   0
         Left            =   3960
         TabIndex        =   2
         Top             =   510
         Width           =   405
      End
      Begin VB.CommandButton cmdBrowse 
         Caption         =   "..."
         Height          =   315
         Index           =   1
         Left            =   3960
         TabIndex        =   1
         Top             =   1110
         Width           =   405
      End
      Begin VB.Label lblLabel 
         AutoSize        =   -1  'True
         Caption         =   "From"
         Height          =   195
         Index           =   0
         Left            =   180
         TabIndex        =   7
         Top             =   300
         Width           =   345
      End
      Begin VB.Label lblLabel 
         AutoSize        =   -1  'True
         Caption         =   "To"
         Height          =   195
         Index           =   1
         Left            =   180
         TabIndex        =   6
         Top             =   930
         Width           =   195
      End
   End
   Begin FLWDiskFile.FWFileOperations objFileOperations 
      Left            =   0
      Top             =   0
      _ExtentX        =   820
      _ExtentY        =   820
   End
   Begin FLWSystem.FWSysInfo objSysInfo 
      Left            =   615
      Top             =   15
      _ExtentX        =   820
      _ExtentY        =   820
   End
End
Attribute VB_Name = "frmFile"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub cmdBrowse_Click(Index As Integer)
  Dim strName   As String
  Dim strFolder As String
  
  strFolder = objFileOperations.BrowseForFolder("Select directory", _
                                                flwdiskfile.flwBrowseDesktop, _
                                                strName)
  If strFolder <> "" Then
    If Index = 0 Then
      txtSource = strName
    Else
      txtTarget = strName
    End If
  End If
End Sub


Private Sub cmdBrowseFor_Click()
  Dim strDisplayName As String
  Dim strName        As String
  
  strName = objFileOperations.BrowseForFolder("Select a Folder", _
                                               flwdiskfile.flwBrowseMyComputer, _
                                               strDisplayName)
  If strName <> "" Then
    lblLabel(2).Caption = strDisplayName & " selected."
  Else
    lblLabel(2).Caption = "No selection"
  End If
End Sub

Private Sub cmdCopy_Click()
  Dim blnOk As Boolean
  
  blnOk = objFileOperations.FileCopy("Copying files...", _
                                     txtSource.Text, _
                                     txtTarget.Text, _
                                     flwdiskfile.flwFileNoConfirmMKDir + _
                                     flwdiskfile.flwFileNoConfirmation)

End Sub


Private Sub Form_Load()
  txtSource = objSysInfo.System
  txtTarget = objSysInfo.Temp
End Sub

⌨️ 快捷键说明

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