NetBox调用IE功能

双击main.box,程序自动打开IE,并自动打开网站首页。代码如下:
Dim httpd


Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"

'---------------------- Service Event ---------------------

Sub OnServiceStart()
    Set httpd = CreateObject("NetBox.HttpServer")

    If httpd.Create("", 8090) = 0 Then
        Set host = httpd.AddHost("", "\yezishop")
        Shell.Execute """C:\Program Files\Internet Explorer\IEXPLORE.EXE""http://localhost:8090"

        host.EnableScript = true
        host.AddDefault "index.asp"
        host.AddDefault "default.htm"

        httpd.Start
    else
        Shell.Quit 0
    end if
End Sub

Sub OnServiceStop()
    httpd.Close
End Sub

Sub OnServicePause()
    httpd.Stop
End Sub

Sub OnServiceResume()
    httpd.Start
End Sub

你可能感兴趣的:(C++,c,Web,IE,asp)