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

📄 form1.frm

📁 vb 的例子
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "查找并运行程序"
   ClientHeight    =   3825
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5340
   LinkTopic       =   "Form1"
   ScaleHeight     =   3825
   ScaleWidth      =   5340
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "运行"
      Height          =   375
      Left            =   4320
      TabIndex        =   4
      Top             =   3120
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   3120
      Width           =   3735
   End
   Begin VB.FileListBox File1 
      Height          =   2430
      Left            =   2880
      TabIndex        =   2
      Top             =   360
      Width           =   2295
   End
   Begin VB.DirListBox Dir1 
      Height          =   1770
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   2415
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   2415
   End
   Begin VB.Label Label4 
      Caption         =   "选定文件"
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   2880
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "可执行文件"
      Height          =   255
      Left            =   2880
      TabIndex        =   7
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "文件夹"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   720
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "驱动器"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   120
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
    Private Sub Form_Load()
        File1.Pattern = "*.exe;*.bat"
    End Sub
    Private Sub Dir1_Change()
        File1.Path = Dir1.Path
    End Sub
    Private Sub Drive1_Change()
        Dir1.Path = Drive1.Drive
    End Sub
    Private Sub File1_Click()
        If Right(File1.Path, 1) <> "\" Then
            Text1.Text = File1.Path & "\" & File1.filename
        Else
            Text1.Text = File1.Path & File1.filename
        End If
    End Sub
    Private Sub Command1_Click()
         Dim int1 As Integer
         int1 = Shell(Text1.Text, vbNormalFocus)
    End Sub
    

⌨️ 快捷键说明

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