Results 1 to 3 of 3

Thread: [Resolved] keyboard sensitivity

  1. #1

    Thread Starter
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112

    [Resolved] keyboard sensitivity

    halu,

    i'm kinda new to this VB.NET thing and i want to know something about keyboard sensitivity. let's say pressing Ctrl Alt Shift ESC with close the program... i know something about the form_keydown but correct me if i'm wrong, it only handles one key event... like ESC closes the form.

    thanx in advance and best regards,

    member,
    ayan
    Last edited by ayan; Jan 28th, 2004 at 08:00 PM.

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    Does this do what you want?

    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, _
    2.                            ByVal e As System.EventArgs) Handles MyBase.Load
    3.         Me.KeyPreview = True
    4.     End Sub
    5.  
    6.     Private Sub Form1_KeyDown(ByVal sender As Object, _
    7.                               ByVal e As System.Windows.Forms.KeyEventArgs) _
    8.                                                         Handles MyBase.KeyDown
    9.         If e.Alt AndAlso e.Control AndAlso _
    10.                                 e.Shift AndAlso e.KeyCode = Keys.Escape Then
    11.             MsgBox("Close Program")
    12.         End If
    13.     End Sub
    This world is not my home. I'm just passing through.

  3. #3

    Thread Starter
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112

    Thumbs up

    halu,

    YEZZZZ, it rings my bell... hehehe... thanx man. i learn something new....

    thanx times ten to the power of forever...

    --ayan

    writing hello world is fine but developing a large project needs a forum like this.

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