Results 1 to 4 of 4

Thread: Task Swapping

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    25
    How can I disable the windows function to task swapping. (ALT-TAB). I am trying to add some security to my app.

    TIA

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    No, I don't know, but if you're not afraid of timers, you can always make your app to get active

  3. #3
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Since the user could also press CTRL+ESC, ALT+SHIFT+TAB, hit the Windows key, or run TASKMAN.EXE (from the START menu) I think it would be wise to give up trying to do that and re-think your security strategy.

    Personally I think programs that stop people using standard Windows control keys are a pain in the neck.

    But hey, I guess that's just me...

    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    25
    I found the following if anyone is intrested.


    Disabling Ctrl-Alt-Delete and Ctrl-Esc
    It is often useful in Visual Basic programs to be able to disable the Ctrl-Alt-Delete key sequence. It is easily achieved by persuading Windows that a screen saver is running. This code also disables Ctrl-Esc, that is used to activate the Start Menu.

    Declarations

    Copy this code into the declarations section of a module.

    Private Declare Function SystemParametersInfo Lib _
    "user32" Alias "SystemParametersInfoA" (ByVal uAction _
    As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
    ByVal fuWinIni As Long) As Long


    Code

    Sub DisableCtrlAltDelete(bDisabled As Boolean)
    Dim X As Long
    X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
    End Sub



    Use

    'To disable Ctrl-Alt-Delete:
    Call DisableCtrlAltDelete(True)

    'To enable Ctrl-Alt-Delete:
    Call DisableCtrlAltDelete(False)

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