课中坏事完整版在线看:netbox开启服务后自动访问首页 - 被冻僵的水的日志 - 网易博客
来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 15:07:46
netbox开启服务后自动访问首页
电脑科技 2009-07-22 08:48:25 阅读240 评论0 字号:大中小 订阅
netbox开启服务后自动访问首页
Dim httpd
Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"
'---------------------- Service Event ---------------------
Sub On
Set httpd = NetBox.CreateObject("NetBox.HttpServer")
If httpd.Create("", 800) = 0 Then
Set host = httpd.AddHost("", "\wwwroot")
host.EnableScript = true
host.AddDefault "index.html"
httpd.Start
else
Shell.Quit 0
end if
Set ht = CreateObject("NetBox.HtmlWindow")
ht.open "http://localhost/index.html"
ht.showDialog
End Sub
Sub On
httpd.Close
End Sub
Sub On
httpd.Stop
End Sub
Sub On
httpd.Start
End Sub