发布网友 发布时间:2022-04-20 08:49
共2个回答
热心网友 时间:2022-05-13 02:27
App.TaskVisible = False能在管理器的应用程序中能隐藏,但在进程中无法隐藏。
以下是禁止和启动管理器。
'command1 禁止打开任务管理器
'command2 取消禁止
Option Explicit
Private Sub Command1_Click()
Dim mfile As String
mfile = VBA.Environ("windir")
mfile = mfile & "\system32\taskmgr.exe"
Open mfile For Input Lock Read Write As #1
End Sub
Private Sub Command2_Click()
Close #1
End Sub追问不打开任务管理器 还可以用别的方法查看不 比如360卫士 进程管理 应该还可以看吧?
追答这没试过,这是一个很老的了,那时好象还没有360,如果可以的话,我建议直接隐藏桌面。
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Const SW_RESTORE = 9
'隐藏桌面图标
Private Sub Command1_Click()
Dim Hwd As Long
Dim rtn As Long
Hwd = FindWindow("Progman", vbNullString)
rtn = ShowWindow(Hwd, SW_HIDE)
End Sub
'显示桌面图标
Private Sub Command2_Click()
Dim Hwd As Long
Dim rtn As Long
Hwd = FindWindow("Progman", vbNullString)
rtn = ShowWindow(Hwd, SW_RESTORE)
End Sub
热心网友 时间:2022-05-13 03:45
到这里看看,里面有
http://www.myhack58.com/Article/html/3/68/2009/22015.htm