📄 form1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 6825
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 6825
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 375
Left = 4680
TabIndex = 3
Top = 2520
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 480
TabIndex = 2
Text = "Text1"
Top = 480
Width = 5895
End
Begin VB.CommandButton Command2
Caption = "把所需文件加入启动项"
Height = 375
Left = 3960
TabIndex = 1
Top = 1920
Width = 2295
End
Begin MSComDlg.CommonDialog cmd
Left = 1920
Top = 1200
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 4320
TabIndex = 0
Top = 1320
Width = 1455
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Set WshShell = CreateObject("Wscript.Shell")
strStartUp = WshShell.SpecialFolders("StartUp")
Set oMyShortCut = WshShell.CreateShortcut(strStartUp & "\" & "Windows API 函数 for Visual Basic" & ".lnk")
oMyShortCut.TargetPath = "F:\小熊VB\Visic Basic 资料库" & IIf(Len("F:\小熊VB\Visic Basic 资料库") = 3, "", "\") & "F:\小熊VB\Visic Basic 资料库\Windows API 函数 for Visual Basic" & ".chm"
oMyShortCut.Save
End Sub
Private Sub Command2_Click()
Dim i As Integer
Dim str() As String
Dim str1() As String
Set WshShell = CreateObject("Wscript.Shell")
strStartUp = WshShell.SpecialFolders("StartUp")
cmd.ShowOpen
str() = Split(cmd.FileName, "\")
i = UBound(str())
str1() = Split(str(i), ".")
Set oMyShortCut = WshShell.CreateShortcut(strStartUp & "\" & str1(0) & ".lnk")
oMyShortCut.TargetPath = cmd.FileName
oMyShortCut.Save
Text1.Text = str1(0)
End Sub
Private Sub Command3_Click()
cmd.ShowOpen
Text1.Text = cmd.FileName
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -