hello, can anyone help, i am trying to invoke(if that is the right term) a keyup control from another sub, i have tried :
but this just throws up an error, i know that i could enclose the code from the keyup control in a function and call the function but i didn't want to create more lines of code unessesarily.
Thanks in advance!!
I don't understand what you mean by trying to invoke a keyup control in another sub.
For example if I have a textbox and I have a Handles TextBox1.KeyUp then what are you attempting to do with it? Invoke a keypress to fire it?
This is an example of invoking a keypress to fire the TextBox1.KeyUp event I suppose.
Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged End Sub Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp If e.KeyData Then Me.Text = "KeyStroke occured" End If End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click TextBox1.Focus() SendKeys.Send("A") End Sub End Class
You've taught me everything I know but not everything you know.
- Edited by Mr. MonkeyboyMicrosoft community contributor Thursday, January 31, 2013 12:13 PM