СообЧа > База Знаний > Программирование > Visual Basic

Вопрос

Как ее скрыть программу из [Ctrl] + [Alt] + [Del]?

Ответ

Попробуй app.taskvisible=false.

Если не прокатит, то:

Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As
Long, ByVal dwType As Long) As Long
Public Sub MakeMeService()
  Dim pid As Long, reserv As Long
  'Get the current process ID
   pid = GetCurrentProcessId()
   'Register as service
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub UnMakeMeService()
     Dim pid As Long, reserv As Long
     'Get the current process ID
     pid = GetCurrentProcessId()
     'Unregister as service
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
Private Sub Form_Load()
     'KPD-Team 1999
     'URL: http://www.allapi.net/
     'E-Mail: KPDTeam@Allapi.net
     MakeMeService
'Right now, you're program is hidden from the CTRL-ALT-DEL-list
End Sub
Private Sub Form_Unload(Cancel As Integer)
     UnMakeMeService
End Sub


Хвастунов Михаил

'В 9#:
lRtn = RegisterServiceProcess(GetCurrentProcessId, 1)
'===
'В NT:
lRtn = GetWindow(Me.hwnd, GW_OWNER)
lRtn = ShowWindow(lRtn, SW_HIDE)


Vovan-VE



Copyright © 2000-2004 Сообщество Чайников
Контактная информация