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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form1 
   BackColor       =   &H00FFC0C0&
   Caption         =   "改变Windows图标的大小"
   ClientHeight    =   1665
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4335
   LinkTopic       =   "Form1"
   ScaleHeight     =   1665
   ScaleWidth      =   4335
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   2085
      TabIndex        =   3
      Text            =   "32"
      Top             =   285
      Width           =   1320
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H00C0C0C0&
      Caption         =   "退出"
      Height          =   420
      Left            =   2895
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   975
      Width           =   1380
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00C0C0C0&
      Caption         =   "恢复图标大小"
      Height          =   420
      Left            =   1485
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   975
      Width           =   1380
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "调整图标大小"
      Height          =   420
      Left            =   60
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   975
      Width           =   1380
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "图标大小:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   570
      TabIndex        =   4
      Top             =   300
      Width           =   1575
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
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
 
Const REG_SZ As Long = 1
Const HKEY_CURRENT_USER = &H80000001

Private Sub Command1_Click()
  Dim hKey As Long
  RegCreateKey HKEY_CURRENT_USER, "Control Panel\desktop\WindowMetrics", hKey
  RegSetValueEx hKey, "Shell Icon Size", 0, REG_SZ, ByVal Text1.Text, 13
  RegCloseKey hKey
End Sub

Private Sub Command2_Click()
  Dim hKey As Long
  RegCreateKey HKEY_CURRENT_USER, "Control Panel\desktop\WindowMetrics", hKey
  RegSetValueEx hKey, "Shell Icon Size", 0, REG_SZ, ByVal "32", 13
  RegCloseKey hKey
End Sub

Private Sub Command3_Click()
  End
End Sub

⌨️ 快捷键说明

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