Results 1 to 7 of 7

Thread: how can i disable the windows button??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    mousafah,abu-dhabi,UAE
    Posts
    29
    hi all,

    i obtained the code to disable alt+ctrl+delete ,alt+tab and ctrl+esc but, i didn't find a code to disable windows button ( the button is next to left alt button in ur keyboard )

    Ahmed Walid

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Code:
    Dim h1, h2 As Long
    h1 = FindWindow("Shell_trayWnd", vbNullString)
    h2 = FindWindowEx(h1, 0, "Button", vbNullString)
    EnableWindow h2, 1
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    This will only disable the button on the screen to disable the keyboard button you can set a system hook monitoring keypresses.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    mousafah,abu-dhabi,UAE
    Posts
    29
    thanx for ur interesting but it didn't work

    i can hide the start button so the user can't click it, but still he can press the windows button in his keyboard

    i wanna to disable just the press (like alt+ctrl+delete)

    any other suggestions??

    Ahmed Walid

  5. #5
    Addicted Member
    Join Date
    May 2000
    Posts
    247
    Vlatko

    you posted
    Dim h1, h2 As Long

    that does not mean that h1 is a long variable type right?
    Mako Shark
    Great White

  6. #6
    Guest
    Don't know about your computer, but for mine, this code disables ctrl+alt+del ctrl+esc alt+tab and the windows key.

    Code:
    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        
    
    Sub DisableCtrlAltDelete(bDisabled As Boolean)
        Dim X As Long
        X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
    End Sub
    
    
    'disable:
    Call DisableCtrlAltDelete(True)   
    'enable:
    Call DisableCtrlAltDelete(False)

  7. #7
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    you might want to take a look at Jop's code.

    http://forums.vb-world.net/showthrea...threadid=40315
    Chemically Formulated As:
    Dr. Nitro

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