467,146 Members | 1,265 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

VB.Net SendKeys

I am trying to send:

Ctrl, Shift, TAB and the number 1 contemporaneously.

I am using:

System.Windows.Forms.SendKeys.Send("^+{TAB}1")

or

System.Windows.Forms.SendKeys.Send("^+({TAB}1)")

Neither work. Any clues?

Thanks in advance.

Robert
May 4 '07 #1
  • viewed: 48033
Share:
4 Replies
Expert 8TB
What does "contemporaneously" mean in this context?

According to the doco, your first version should successfully send the Ctrl-Shift-Tab first, followed by "1". Perhaps you need to use SendWait?
May 5 '07 #2
Sorry...

I am trying to send:

Ctrl, Shift, TAB and the number 1 all at the same time.

i.e., Hold down all 4 keys simultaneously.

I have tried:

System.Windows.Forms.SendKeys.Send("(^+{TAB}1)")
System.Windows.Forms.SendKeys.Send("^+({TAB}1)")
System.Windows.Forms.SendKeys.Send("(^+)({TAB}1)")

Nothing seems to work.

Thanks for the reply.

Robert
May 5 '07 #3
SammyB
Expert 512MB
Sorry...

I am trying to send:

Ctrl, Shift, TAB and the number 1 all at the same time.

i.e., Hold down all 4 keys simultaneously.
You cannot do that: it is two key strokes. ^+{TAB} ctrl shift tab is one key stroke and 1 is the second key stroke, so "^+{TAB}" & "1" would be the way I would try.

Are you trying to do this: http://www.thescripts.com/forum/thread206970.html?
May 5 '07 #4
SammyB
Expert 512MB
You cannot do that
Look at http://msdn2.microsoft.com/en-us/lib...orms.keys.aspx
Notice that some of the enums are listed as "modifier" keys: you can bitwise combine these, so Keys.Control + Keys.Shift + Keys.Tab is a single key, but there is no Tab modifier key.
May 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Wayne Gibson | last post: by
1 post views Thread by Bryan | last post: by
6 posts views Thread by Michael Maes | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.