i know how to give the control + t command ( " SendKeys.Send("^t") ) and how to send the alt command ( "SendKeys.Send("%t") )
but how do i give a command that presses alt and ctrl and t in the same time?
Printable View
i know how to give the control + t command ( " SendKeys.Send("^t") ) and how to send the alt command ( "SendKeys.Send("%t") )
but how do i give a command that presses alt and ctrl and t in the same time?
You mean, automatically type stuff?
yes :) i want to automatically type ctrl-alt-t
Code:SendKeys.Send("^%t")
If the command is listed for a control you could use shortcut keys.
What would the 'delete' button charact be please?
http://msdn.microsoft.com/en-us/libr...keys.send.aspx
DEL or DELETE
{DELETE} or {DEL}
My suggestion will do it automatically too, shortcut keys are basically the same as keypress or keydown events. You just don't have to write code for them. I don't usually do it that way though, i'm just saying what he could do.
Here:
Instead of MsgBox("hello") use your own code that tells the application what you want it to do. That's an easy way to do it as well. You want an event on those keys if i'm not mistaken?Code:Private Sub RichTextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.Control = True AndAlso e.Alt AndAlso e.KeyCode = Keys.T Then
MsgBox("hello")
End If
End Sub
Edit: Nevermind I think i've read the question wrong. You want the code to execute Ctrl + Alt + T automatically without actually pressing the keys? and not have an event on those keypresses.. I believe skor13 is correct then, I misread the post.