Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

SendKeys RCONTROL possible?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe S - 06 Feb 2008 00:39 GMT
I have been searching all over for how to use SendKeys to send
Keys.RControlKey.

I've tried all manner of byte conversions and just can't get it to
work.

Pity there is no {RCONTROL} defined for me!

Any help is very much appreciated.

Thanks,

Joe
Nicholas Paldino [.NET/C# MVP] - 06 Feb 2008 01:23 GMT
Joe,

   You might want to use the SendInput API function through the P/Invoke
layer instead.  This will fill in the gaps that SendKeys has.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>I have been searching all over for how to use SendKeys to send
> Keys.RControlKey.
[quoted text clipped - 9 lines]
>
> Joe
Joe S - 06 Feb 2008 20:59 GMT
On Feb 5, 5:23 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
> Joe,
>
[quoted text clipped - 18 lines]
>
> > Joe

Nicholas,

I got that working, so I can do a few things I could not before, but
now I am running into the case where I want to send HOME, PAGE_DOWN,
etc. from the Insert/Delete/Home/End/Page Up/Page Down cluster, but
what is actually being sent is the equivalent keys from the numeric
keypad.

To be more specific, I am controlling a legacy terminal emulator
(BluVista), and it is interpreting VK_NEXT = PgDn (3 on the numeric
keypad) with NumLock off as "3". I need to be able to send Page Down
from the cluster to control the emulator properly.

Is there some twiddle in SendInput that tells it whether to send Page
Down or PgDn?

Joe
Ben Voigt [C++ MVP] - 06 Feb 2008 22:58 GMT
> On Feb 5, 5:23 pm, "Nicholas Paldino [.NET/C# MVP]"
> <m...@spam.guard.caspershouse.com> wrote:
[quoted text clipped - 37 lines]
> Is there some twiddle in SendInput that tells it whether to send Page
> Down or PgDn?

The KEYEVENTF_EXTENDEDKEY flag and/or the scan code, should differentiate
between them.

> Joe
Joe S - 07 Feb 2008 01:13 GMT
> > On Feb 5, 5:23 pm, "Nicholas Paldino [.NET/C# MVP]"
> > <m...@spam.guard.caspershouse.com> wrote:
[quoted text clipped - 46 lines]
>
> > Joe

That worked great. Thanks SO much to both of you for pointing me in
the right direction.

Joe
Ben Voigt [C++ MVP] - 07 Feb 2008 15:31 GMT
>>> On Feb 5, 5:23 pm, "Nicholas Paldino [.NET/C# MVP]"
>>> <m...@spam.guard.caspershouse.com> wrote:
[quoted text clipped - 51 lines]
>
> Joe

Comes from processing arrow keys using getch() a long long time ago.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.