Private Sub Command1_Click() '首先,在工程引用中加入对 Windows Script Host Object Model的引用 Dim wshshellobj As New IWshRuntimeLibrary.wshshell Dim homeurl As String homeurl = wshshellobj.RegRead("HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page") MsgBox "主页地址为:" + homeurl Set wshshellobj = Nothing End Sub
Private Sub Command1_Click() '首先,在工程引用中加入对 Windows Script Host Object Model的引用 Dim wshshellobj As New IWshRuntimeLibrary.wshshell Dim homeurl As String homeurl = wshshellobj.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\Start Page") MsgBox "主页地址为:" + homeurl Set wshshellobj = Nothing End Sub