simulate shortcut key

G

Guest

hey all,
in my code-behind windows project (vs2005) i was wondering if you can
simulate the pressing of key combinations (i.e. Alt + S)?

thanks,
rodchar
 
M

Morten Wennevik [C# MVP]

hey all,
in my code-behind windows project (vs2005) i was wondering if you can
simulate the pressing of key combinations (i.e. Alt + S)?

thanks,
rodchar

Well, you can certainly detect if Alt + S is being pressed if that is what you mean. You may have to set KeyPreview on the parent form to get notified of keypresses in controls having their own keypress handling.
 
C

Chris Shepherd

rodchar said:
hey all,
in my code-behind windows project (vs2005) i was wondering if you can
simulate the pressing of key combinations (i.e. Alt + S)?

thanks,
rodchar

Look into System.Windows.Forms.SendKeys.

Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top