找传奇、传世资源到传世资源站!

定时关机小程序源码

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

这是一个可设置时间的关机小程序
定时关机小程序源码 HTML/CSS-第1张
<script language="VBScript">
 Sub Window_onLoad
  strComputer = "."
  Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
  For Each objItem in colItems
   intHorizontal = objItem.ScreenWidth
   intVertical = objItem.ScreenHeight
  Next
  intLeft = (intHorizontal - 900) / 2
  intTop = (intVertical - 700) / 2
  window.resizeTo 350,500
  window.moveTo intLeft, intTop
 End Sub
    Sub OneSub
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -s -f -t 1800", 0, TRUE)
    End Sub

    Sub TwoSub
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -s -f -t 2700", 0, TRUE)
    End Sub

    Sub ThrSub
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -s -f -t 3600", 0, TRUE)
    End Sub

    Sub fouSub
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -s -f -t 10", 0, TRUE)
    End Sub

 Sub OK
  If IsNumeric(Text.Value) Then
   OverTime = Text.Value * 60
   set objectShell=CreateObject("wscript.shell")
   iReturn = objectShell.Run("shutdown -s -f -t " & OverTime, 0, TRUE)
  Else
   MsgBox "请输入一个有效的数字。"
  End If
    End Sub

    Sub ShutDown
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -s -t 0", 0, TRUE)
    End Sub

    Sub EShutDown
  set objectShell=CreateObject("wscript.shell")
  iReturn = objectShell.Run("shutdown -a", 0, TRUE)
    End Sub

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复