|
-
May 13th, 2011, 02:45 PM
#1
Thread Starter
Junior Member
ctrl + alt + t
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?
-
May 13th, 2011, 03:24 PM
#2
New Member
Re: ctrl + alt + t
You mean, automatically type stuff?
-
May 13th, 2011, 03:25 PM
#3
Thread Starter
Junior Member
Re: ctrl + alt + t
yes i want to automatically type ctrl-alt-t
-
May 13th, 2011, 03:40 PM
#4
Addicted Member
Re: ctrl + alt + t
Code:
SendKeys.Send("^%t")
-
May 14th, 2011, 04:14 AM
#5
Re: ctrl + alt + t
If the command is listed for a control you could use shortcut keys.
-
May 14th, 2011, 04:20 AM
#6
Addicted Member
Re: ctrl + alt + t
 Originally Posted by AceInfinity
If the command is listed for a control you could use shortcut keys.
Code:
SendKeys.Send("^%t")
My assumption by "automatic" is that he wants the program to do it and not to physically do it himself. ^%t is just a combination of the three characters he was requesting that does in fact "press" Ctrl+Alt+T.
-
May 14th, 2011, 05:49 AM
#7
Hyperactive Member
Re: ctrl + alt + t
What would the 'delete' button charact be please?
-
May 14th, 2011, 05:51 AM
#8
Thread Starter
Junior Member
-
May 14th, 2011, 05:59 PM
#9
Re: ctrl + alt + t
 Originally Posted by skor13
Code:
SendKeys.Send("^%t")
My assumption by "automatic" is that he wants the program to do it and not to physically do it himself. ^%t is just a combination of the three characters he was requesting that does in fact "press" Ctrl+Alt+T.
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:
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
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?
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.
Last edited by AceInfinity; May 14th, 2011 at 06:23 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|