Results 1 to 5 of 5

Thread: Remove application from Ctrl+Alt+Delete?? How

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    52
    Does anyone know how to remove or hide an application from being Ctrl+Alt+Del outted?
    I just want to remove it from that list that appears.



    This is my final problem in a program that has been bugging me for days.
    regards
    M.

  2. #2
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425
    Put this code in a module:

    Code:
    Public Declare Function GetCurrentProcessId _
    Lib "kernel32" () As Long
    Public Declare Function GetCurrentProcess _
    Lib "kernel32" () As Long
    Public Declare Function RegisterServiceProcess _
    Lib "kernel32" (ByVal dwProcessID As Long, _
    ByVal dwType As Long) As Long
    
    Public Const RSP_SIMPLE_SERVICE = 1
    Public Const RSP_UNREGISTER_SERVICE = 0
    To remove your app from the list, call this procedure:

    Code:
    Public Sub MakeMeService()
    Dim pid As Long
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    To restore your app into the list, call this procedure:

    Code:
    Public UnMakeMeService()
    Dim pid As Long
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, _
    RSP_UNREGISTER_SERVICE)
    'End Code
    Hope this was of help!

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    52
    Any ideas why
    '
    Dim pid As Long
    Dim reserv As Long

    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    '

    regserv is invoking a 'Variable not defined' when called at form ini.

    Any gems to offer?



    Regards
    M.

  4. #4
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425
    I have no idea, I copied the code from a tip on VB-World...

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    52
    At 1.30 am our time (New Zealand) i shall quit coding and go to bed as i am asking dumb questions.

    All my hassle over the error in that code was simply caused by my declaration

    Dim pid As Long
    Dim reserv As Long <---- The culprit should = Dim reGserv.

    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE


    However all is working now.

    And thanks a million for the tip Cyber. Much appreciated as always.

    Cheers all and g'night.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width