www.pudn.com > QQ2009.rar > mBrowser.bas, change:2009-11-15,size:743b


Attribute VB_Name = "mBrowser" 
 
Option Explicit 
 
Dim shellPath As String 
 
Private Function ReadReg(RegPath As String) 
    On Error GoTo ErrHandle 
     
    Dim w As Object 
    Set w = CreateObject("wscript.shell") 
     
    ReadReg = w.regread(RegPath) 
     
ErrHandle: 
End Function 
 
Public Sub OpenURL(URL As String) 
    Call Shell(Replace(shellPath, "%1", URL), vbMaximizedFocus) 
End Sub 
 
Public Sub InitAutoBrowser() 
    Dim bFlag As String, bFlag2 As String, bPath As String 
    bFlag = ReadReg("HKCR\.htm\") 
    bFlag2 = ReadReg("HKCR\" & bFlag & "\shell\") 
    If bFlag2 = "" Then bFlag2 = "open" 
     
    bPath = ReadReg("HKCR\" & bFlag & "\shell\" & bFlag2 & "\command\") 
    shellPath = bPath 
End Sub