VB能关闭其它应用程序吗?
来源:百度知道 编辑:UC知道 时间:2024/06/17 22:28:54
AlphaBlend 的回答是可行的,但是托盘图标不会自动消失,还请继续帮忙!
'VB 终止指定进程 ,刷新托盘图标
Private Type PROCESSENTRY32
dwSize As Long
cntUsage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
dwFlags As Long
szExeFile As String * 1024
End Type
Private Type MODULEENTRY32
dwSize As Long
th32ModuleID As Long
th32ProcessID As Long
GlblcntUsage As Long
ProccntUsage As Long
modBaseAddr As Byte
modBaseSize As Long
hModule As Long
szModule As String * 256
szExePath As String * 1024
End Type
Private Const WM_MOUSEMOVE = &H200
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As