)->
如果我们在funcb调用语句的后面在加一个无效语句,执行时会弹出错误msg框,说明函数体内的On error resume Next不能作用到函数体外很简单的,现在就尝试一下吧
strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\cimv2")
Set colItems=objWMIService.ExecQuery("Select * from Win32_DesktopMonitor",,48)
For Each objItem in colItems
WScript.Echo "ScreenHeight: " & objItem.ScreenHeight
WScript.Echo "ScreenWidth: " & objItem.ScreenWidth
Next
当我们要移动控制项(Control)或表单(Form)时,很多人习惯这样写:
frmCustomer.Left=frmCustomer.Left 100
frmCustomer.Top=frmCustomer.Top 50
但是若使用MoveMethod,可以加快40:
frmCustomer.MovefrmCustomer.Left 100,frmCustomer.Top 50->
'说明 : 通过VBS脚本查看 系统C盘 剩下的空间
'Creator : Eric1991
'Date : 2013-11-4
Set objWMIService=GetObject("winmgmts:")
Set objLogicalDisk=objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")
Wscript.Echo cint(objLogicalDisk.FreeSpace / 1024 / 1024 / 1024) & "GB"
常用对话框控件属性及方法表-valign="top"width="29">属性->-valign="top"width="71">说明->-valign="top"width="29">
Copies->-valign="top"width="71">
要打印的份数->-valign="top"width="29">
FromPage->-valign="top"width="71">
打印的起始页->-valign="top"width="29">
ToPage->-valign="top"width="71">
打印的结束页->-valign="top"width="29">
Hdc->-valign="top"width="71">
选定打印机的设备上下文->-valign="top"width="29">方法->-valign="top"width="71">说明->-valign="top"width="29">
ShowOpen->-valign="top"width="71">
打开->-valign="top"width="29">
ShowSave->-valign="top"width="71">
另存为->-valign="top"width="29">
ShowColor->-valign="top"width="71">
颜色->-valign="top"width="29">
ShowFont->-valign="top"width="71">
字体->-valign="top"width="29">
ShowPrinter->-valign="top"width="71">
打印->-valign="top"width="29">
ShowHelp->-valign="top"width="71">
调用Windows“帮助”->
例:打开文件对话框的命令如下:
dimfilename1AsString
Dialog1.showopen显示打开文件对话框
Filename1=Dialog1.filename获取所选择的文件名
例:打开保存文件对话框的命令如下:
dimfilename1AsString
Dialog1.showsave显示保存文件对话框
Filename1=Dialog1.filename获取所选择的文件名
其它几种对话框的打开方式与上面的方法相同,值得一提的是可以通过该控件控制打印机的使用,非常方便
下列命令将本地计算机的 IIS 配置复制到 SVR01 服务器奇迹mu觉醒ios例如,如果服务器产生一个名叫Myresult.html的HTML文件答复来自客户端的请求,客户端应用能够通过与服务器建立的CrescentActiveX连接来获取并下载这个文件问:
您好,脚本专家。