1、隐藏线程不让其显示在“关闭程序”中: Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long 注册服务(在“关闭程序”中隐藏) Dim pid As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, 1 取消已注册服务 Dim pid As Long pid = GetCurrentProcessId() RegisterServiceProcess pid, 0 2、If App.PreInstance then msgbox "Application is running"OK,还满意么?:)
Sorry ,If App.PrevInstance then msgbox "Application is running",呵呵,打漏了一个字母v :)
但是程序还是可以的"系统信息"中查到。要想不在ctrl+alt+del时显示你的程序,要用到一个特殊的函数,哎~~~~,可惜我
现在找不到了,你到别的论坛问问吧。
能不显示在ctrl+alt+del里,
但是,还是能通过查进程找到,对win98有效,
App.PrevInstance判断程序是否已经运行
对的。
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
注册服务(在“关闭程序”中隐藏)
Dim pid As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, 1
取消已注册服务
Dim pid As Long
pid = GetCurrentProcessId()
RegisterServiceProcess pid, 0
2、If App.PreInstance then msgbox "Application is running"OK,还满意么?:)
app.showtask=false'不在进程管理器中显示
用app.previnstance来判断当前程序是否在运行。