Is it possible to get the software to call a function or do something when something i pasted (ctrl+v) into a textbox? Not when a user manually type text into the box, ONLY when the user pasts text into the box.
Im using VB2008
Cheers!
Textbox question
Started by deas, Mar 12 2009 10:28 AM
6 replies to this topic
#1
Posted 12 March 2009 - 10:28 AM
|
|
|
#3
Posted 12 March 2009 - 01:11 PM
Got any examples? :)
#4
Posted 13 March 2009 - 12:08 PM
#5
Posted 13 March 2009 - 07:37 PM
I think that should be possible. Did you try again?
#6
Posted 14 March 2009 - 01:53 AM
I did think of that, and tried it. But the problem is that e.KeyCode only seems to be able to handle 1 key at the time.
My code looks like this:
I know this isnt right (since it's not working). But I have tried alot of ways but cant get it to work :/
My code looks like this:
Private Sub Textbox1_Keypress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox1.KeyDown If e.KeyCode = Keys.Control Then If e.KeyCode = Keys.V Then FixPastedData() End If End If End Sub
I know this isnt right (since it's not working). But I have tried alot of ways but cant get it to work :/
#7
Posted 15 March 2009 - 02:15 PM
try this
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.Control And e.KeyCode = Keys.V Then
FixPastedData()
End If
End Sub


Sign In
Create Account

Back to top









