Hi,

I want to know how to send keys like ALT, Shift, Ctrl, Entre, etc. with the My.Computer.SendKeys() function.

Also, I need a code with which i can send 2 keys together like Ctrl+C

If its not possible with SendKeys(), please suggest some other function to acheive this.

Thank you...

Ctrl, Alt, Shift are not 'keys', they are modifiers to keys. C is a key, value is 67. Ctrl-C is also a key, value 3.

Look on Google for information about Sendkeys

on any event :

SendKeys.Send("{ENTER}") 'for enter
SendKeys.Send("{%}") 'for Alt
SendKeys.Send("{^}") 'for Ctrl
SendKeys.Send("{+}") 'for shift
' Combination
SendKeys.Send("^(c)") 'for Ctrl-C


More information, go to msdn online

anyway you posting on wrong section..this section for vb 4,5,6 not for vb.net section.

commented: good +1
commented: Yes. that way +3

on any event :

SendKeys.Send("{ENTER}") 'for enter
SendKeys.Send("{%}") 'for Alt
SendKeys.Send("{^}") 'for Ctrl
SendKeys.Send("{+}") 'for shift
' Combination
SendKeys.Send("^(c)") 'for Ctrl-C


More information, go to msdn online

anyway you posting on wrong section..this section for vb 4,5,6 not for vb.net section.

Thanks a lot!!!

hi i need to know how to send key. in a sence of, i create an application, with media player controls, so if i cleck next on my application, automaticaly next is clicked on the windows media player on winamp, same for other keys, please help.. cardine.m@gmail.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.