Re: simulate shortcut key

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Fri, 31 Aug 2007 16:20:00 +0200, rodchar <rodchar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

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.

--
Happy coding!
Morten Wennevik [C# MVP]
.



Relevant Pages

  • Re: simulate shortcut key
    ... rodchar wrote: ... in my code-behind windows project i was wondering if you can simulate the pressing of key combinations (i.e. Alt + S)? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: keyboard shortcut
    ... At least on Windows machines, Alt + t + w is ... That is pressing Alt + t then pressing w after releasing the other two. ... shortcut keys on that, either. ...
    (microsoft.public.word.customization.menustoolbars)
  • Re: Left click shortcut?
    ... To Close a Message window in Outlook Express: Pressing both the Alt key and F key ... Message Compose window, and after doing the above a dialog box comes up with options, like ... You would either use the TAB key ...
    (microsoft.public.windowsxp.general)
  • Re: Keyboard Layout for WinCE 4.2 or 5.0
    ... I try to use kbdtest to catch messages for pressing Right <ALT> + 'L' key ... >> Hungarian, Romanian, Slovenia, Czech and Polish input language. ...
    (microsoft.public.windowsce.platbuilder)
  • Language wont change from English to Korean
    ... could change back and forth from either one by pressing ... the "ALT" key. ... by this phenomenon and if anyone knows how to fix this I ... Sincerely, JOhnny ...
    (microsoft.public.windows.inetexplorer.ie6.browser)