📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000007&
Caption = "隐藏、显示开始按钮"
ClientHeight = 1140
ClientLeft = 60
ClientTop = 345
ClientWidth = 4440
LinkTopic = "Form1"
ScaleHeight = 1140
ScaleWidth = 4440
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
BackColor = &H0080C0FF&
Caption = "退出"
Height = 870
Left = 2895
Style = 1 'Graphical
TabIndex = 2
Top = 150
Width = 1365
End
Begin VB.CommandButton Command1
BackColor = &H0080C0FF&
Caption = "隐藏"
Height = 870
Left = 165
Style = 1 'Graphical
TabIndex = 1
Top = 150
Width = 1365
End
Begin VB.CommandButton Command2
BackColor = &H0080C0FF&
Caption = "显示"
Height = 870
Left = 1530
Style = 1 'Graphical
TabIndex = 0
Top = 150
Width = 1365
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias _
"FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", vbNullString)
ShowWindow OurHandle&, 0 '隐藏开始按钮
End Sub
Private Sub Command2_Click()
OurParent& = FindWindow("Shell_TrayWnd", "")
OurHandle& = FindWindowEx(OurParent&, 0, "Button", vbNullString)
ShowWindow OurHandle&, 5 '显示开始按钮
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -