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

📄 form1.frm

📁 vb 窗体实例 都是自己的例子
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "禁止创建快捷方式出现“快捷方式”四个字"
   ClientHeight    =   1815
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form2"
   ScaleHeight     =   1815
   ScaleWidth      =   4680
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "显示快捷方式四个字"
      Height          =   465
      Left            =   435
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   390
      Width           =   1890
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFC0C0&
      Caption         =   "隐藏快捷方式四个字"
      Height          =   465
      Left            =   2400
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   390
      Width           =   1890
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H00FFC0C0&
      Caption         =   "退出"
      Height          =   465
      Left            =   435
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   960
      Width           =   3825
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
 Option Explicit
 Const REG_BINARY As Long = 3
 Const HKEY_CURRENT_USER = &H80000001
 
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long

Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
    (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long

Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" _
    (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, _
    ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
    
Private Sub Command1_Click()
  Dim hKey As Long
  RegCreateKey HKEY_CURRENT_USER, _
  "Software\Microsoft\Windows\CurrentVersion\Explorer", hKey
  Dim bArr(0 To 4) As Byte
  bArr(0) = &H1E: bArr(1) = &H0: bArr(2) = &H0: bArr(3) = &H0
  RegSetValueEx hKey, "LINK", 0, REG_BINARY, bArr(0), 4
  MsgBox "已完成设置,请重新启动计算机,然后在桌面上创建快捷方式"
  RegCloseKey hKey
End Sub

Private Sub Command2_Click()
  Dim hKey As Long
  RegCreateKey HKEY_CURRENT_USER, _
  "Software\Microsoft\Windows\CurrentVersion\Explorer", hKey
  Dim bArr(0 To 4) As Byte
  bArr(0) = &H0: bArr(1) = &H0: bArr(2) = &H0: bArr(3) = &H0
  RegSetValueEx hKey, "LINK", 0, REG_BINARY, bArr(0), 4
  MsgBox "已完成隐藏设置,请重新启动计算机,然后在桌面上创建快捷方式"
  RegCloseKey hKey
End Sub

Private Sub Command3_Click()
  End
End Sub

⌨️ 快捷键说明

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