Results 1 to 6 of 6

Thread: [RESOLVED] [2005] Capture when a user pastes

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    Resolved [RESOLVED] [2005] Capture when a user pastes

    I'm trying to find the easiest way to capture when the user presses CRTL+V or right clicks and pastes inside my textbox (txtSerial).

    My end goal is to take the pasted text and turn it into an array, which I'm already doing, but the problem is my method takes the clipboard text when the user raises the TextChange event, even if their not actually pasting.

    Edit:

    Okay so I figured out how to capture the key press of CRTL + V, now I just need to figure out how to capture when the user pastes from right clicking.

    Code:
    Private Sub txtSerial1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtSerial1.KeyDown
            If e.KeyCode = Keys.V And Keys.Alt Then
                'Fire!
            End If
        End Sub
    Last edited by tylerm; Mar 21st, 2007 at 03:24 PM.

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