Results 1 to 13 of 13
  1. #1
    ___x][GooD.'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    Portugal
    Posts
    255
    Reputation
    10
    Thanks
    136
    My Mood
    Tired

    [Help] Disable Alt + F4

    Hi, Im doing a program to block my computer with a login system..
    But the only way to close it its alt + f4 (You cant close it by taskmanager.)
    How can i disable the alt+ f4?

  2. #2
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Ummmm You have to edit the event of alt f4 like this

    Code:
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
            '  Code to Override the Alt-F4 keys combination
            If e.KeyData = Keys.Alt + Keys.F4 Then
                'nothing
            End If
        End Sub


    my guess..but I'm a noob

    Edit: You forgot about Window's button
    Last edited by willrulz188; 01-20-2011 at 04:48 PM.
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  3. The Following 2 Users Say Thank You to willrulz188 For This Useful Post:

    leoisso (01-27-2011),___x][GooD. (01-20-2011)

  4. #3
    Threadstarter
    Unverified User
    ___x][GooD.'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    Portugal
    Posts
    255
    Reputation
    10
    Thanks
    136
    My Mood
    Tired
    Quote Originally Posted by willrulz188 View Post
    Ummmm You have to edit the event of alt f4 like this

    Code:
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
            '  Code to Override the Alt-F4 keys combination
            If e.KeyData = Keys.Alt + Keys.F4 Then
                'nothing
            End If
        End Sub


    my guess..but I'm a noob

    Edit: You forgot about Window's button
    Hey that didn worked like you said..
    And i didn forgot the windows button xD the border is none..

    It closed with alt + f4 -.-'

    If we cant block alt f4..can you block everything without the enter key?

  5. #4
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Quote Originally Posted by ___x][GooD. View Post
    Hey that didn worked like you said..
    And i didn forgot the windows button xD the border is none..

    It closed with alt + f4 -.-'

    If we cant block alt f4..can you block everything without the enter key?
    Windows will over ride that easy

    add this to a timer (1 milisec)

    Me.topmost = true

    then it wont minimize at all

    I had a waayy better one but I deleted it I'll try to redo it and get back to ya

    Edit: Got it Follow this Works very well
    Credits: Jason
    Last edited by willrulz188; 01-20-2011 at 05:01 PM.
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  6. #5
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Windows Key + L
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  7. #6
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Quote Originally Posted by Brinuz View Post
    Windows Key + L
    Very true
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  8. #7
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    On Form Closing event set e.Cancel to true?
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #8
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Quote Originally Posted by master131 View Post
    On Form Closing event set e.Cancel to true?
    only works if u click the x

  10. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Ok, In form load (important!) you need to enable key preview

    Code:
      Me.KeyPreview = True
    


    Then under the Form Key_Down Event add

    Code:
     If e.KeyData = Keys.Alt + Keys.F4 Then
                e.Handled = True
            End If
    


    That's it, a lot of ppl forget (including online resources) the Key_Preview has to be enabled.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  11. The Following 2 Users Say Thank You to NextGen1 For This Useful Post:

    willrulz188 (01-21-2011),___x][GooD. (01-21-2011)

  12. #10
    Threadstarter
    Unverified User
    ___x][GooD.'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    Portugal
    Posts
    255
    Reputation
    10
    Thanks
    136
    My Mood
    Tired
    Thanks alot it worked NextGen... I can do the same with Alt tab or win + l ..That things?
    If i can, can you say me how i use the Select Case with that=?

  13. The Following User Says Thank You to ___x][GooD. For This Useful Post:

    NextGen1 (01-21-2011)

  14. #11
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Yes You can, Windows Key is Private Const VK_LWIN As Byte = &H5B

    use keys.lwin.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  15. #12
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    /SOLVED...

  16. #13
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Only OP can request solved.