⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 查找.bas

📁 实现对触摸屏的监控
💻 BAS
字号:
Attribute VB_Name = "查找"
Option Explicit
'重起计算机
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
'获得进程
Public Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long

Public Sub ShellWait(sCommandLine As String)
 '作用是运行完指定程序后再出现Msgbox"TT"
 Dim hShell As Long
 Dim hProc As Long
 Dim lExit As Long
 hShell = Shell(sCommandLine, vbNormalFocus)
 Debug.Print hShell
 hProc = OpenProcess(&H400, False, hShell)
  Do
   GetExitCodeProcess hProc, lExit
  DoEvents
 Loop While lExit = &H103
End Sub

Public Sub 重起计算机()
 Dim reboot_pc As Long
 reboot_pc = ExitWindowsEx(EWX_REBOOT, 0)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -