Results 1 to 4 of 4

Thread: Trap printscreen key

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Trap printscreen key

    Dear Friend,

    i need to trap the PrintScreen Button.so if i have press print screen i need to call some function.so please show me some example how to trap the print screen
    Loving dotnet

  2. #2

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: Trap printscreen key

    dear freind,

    i got from here what i need

    http://www.vbforums.com/showthread.p...int+screen+key
    Loving dotnet

  3. #3
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    Re: Trap printscreen key

    The below code not working for printscreen alone, what might be the problem??

    if i change e.keycode=keys.R,its working fine.
    vb Code:
    1. Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
    2.         If e.KeyCode = Keys.PrintScreen Then
    3.             MessageBox.Show("hi")
    4.         End If
    5.     End Sub
    Visual Studio.net 2010
    If this post is useful, rate it


  4. #4
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    Re: Trap printscreen key

    sorry in keyUp event its working

    vb Code:
    1. Private Sub TextBox1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
    2.         If e.KeyCode = Keys.PrintScreen Then
    3.             MessageBox.Show("hi")
    4.         End If
    5.     End Sub
    Visual Studio.net 2010
    If this post is useful, rate it


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