📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
BackColor = &H00FFC0C0&
Caption = "设置IE的主页"
ClientHeight = 2520
ClientLeft = 60
ClientTop = 345
ClientWidth = 6540
LinkTopic = "Form1"
ScaleHeight = 2520
ScaleWidth = 6540
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1350
TabIndex = 3
Text = "www.mingrisoft.com"
Top = 525
Width = 4590
End
Begin VB.CommandButton Command3
BackColor = &H00FF8080&
Caption = "退出"
Height = 495
Left = 4290
Style = 1 'Graphical
TabIndex = 2
Top = 1470
Width = 1740
End
Begin VB.CommandButton Command2
BackColor = &H00FF8080&
Caption = "默认主页"
Height = 495
Left = 2385
Style = 1 'Graphical
TabIndex = 1
Top = 1470
Width = 1740
End
Begin VB.CommandButton Command1
BackColor = &H00FF8080&
Caption = "设置主页"
Height = 495
Left = 480
Style = 1 'Graphical
TabIndex = 0
Top = 1470
Width = 1740
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "地址:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 510
TabIndex = 4
Top = 585
Width = 1530
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_SZ As Long = 1
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\Internet Explorer\Main", hKey
RegSetValueEx hKey, "Start Page", 0, REG_SZ, ByVal Text1.Text, 13
RegCloseKey hKey
End Sub
Private Sub Command2_Click()
Dim hKey As Long
RegCreateKey HKEY_CURRENT_USER, _
"Software\Microsoft\Internet Explorer\Main", hKey
RegSetValueEx hKey, "Start Page", 0, REG_SZ, ByVal "www.Microsoft.com.cn", 13
RegCloseKey hKey
End Sub
Private Sub Command3_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -