469,648 Members | 1,379 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Ctrl-PgUp keys

Hi,

I need to send Ctrl-PgUp (or Ctrl-PgDown) to the active
application but when I use SendKeys.Send("^{PGUP}"), the
program understands it as just PageUp. How may I solve it?

Thanks in advance,
LDV-ME.
Nov 20 '05 #1
9 2836
Hi LDV,

That's the correct syntax for SendKeys, so it should work. Is it getting to the right
Control in the other App, though? If the wrong Control receives the Ctrl-PgUp it will just
ignore it.

Regards,
Fergus
Nov 20 '05 #2
* "Miky" <le******@davinci.com> scripsit:
I need to send Ctrl-PgUp (or Ctrl-PgDown) to the active
application but when I use SendKeys.Send("^{PGUP}"), the
program understands it as just PageUp. How may I solve it?


Should work. Which control are you sending the keys to? Are you sure
it has the input focus?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Hi,

thanks to both of you for your answers.

The control that I want to receive the keys has the input
(if I manually type the combination on the keyboard, it
works without any problem).

Thanks,
LDV-ME.
-----Original Message-----
* "Miky" <le******@davinci.com> scripsit:
I need to send Ctrl-PgUp (or Ctrl-PgDown) to the active
application but when I use SendKeys.Send("^{PGUP}"), the program understands it as just PageUp. How may I solve
it?
Should work. Which control are you sending the keys to? Are you sureit has the input focus?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #4
Hi LDV,

I was afraid you were going to say that! ;-)

It could be that the SendKeys isn't working or it could be that the receiving program
isn't getting it.

To test the first you could write a simple program which will simply report every
keystroke that it receives.

To test the second (hopefully you wrote it) you can have it send keys to itself when
you click a button or something.

Another way to test it would be to use VbScript to do the SendKeys.

Regards,
Fergus
Nov 20 '05 #5
* "Miky" <le******@davinci.com> scripsit:
The control that I want to receive the keys has the input
(if I manually type the combination on the keyboard, it
works without any problem).


Would be interesting if it works with an other application. If you have
an other application that reacts on the key combination, test it with
this application. If you don't have one, you may want to write your own
application and intercept the keyboard events ('KeyDown', 'KeyUp') and
check if the keys arrive properly.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Hi,

I know that is bad :)

To make things worse :)... I don't think that the SendKeys
isn't working because in the program I send other sendkeys
to the same application (normal, such as numbers and
letters or 'Alt' combinations) and they work fine. On the
other side I wrote the program to see if the combination
is correct and it does :(

The application I am sending the sendkeys has been written
in Oracle forms and that combination allows me to move to
the next tab in a tab control.

Thanks.
-----Original Message-----
Hi LDV,

I was afraid you were going to say that! ;-)

It could be that the SendKeys isn't working or it could be that the receiving programisn't getting it.

To test the first you could write a simple program which will simply report everykeystroke that it receives.

To test the second (hopefully you wrote it) you can have it send keys to itself whenyou click a button or something.

Another way to test it would be to use VbScript to do the SendKeys.
Regards,
Fergus
.

Nov 20 '05 #7
Hi leonardo,

Based on my understanding, you can send keys to any .NET Winform
application. But you can not send Ctrl+Page Down key to an Oracle Form
application.
If I misunderstand your meaning, please post here.
Have you tried to capture all the Key events of the Oracle Form application
to see if the Ctrl+Page Down key has been sent to the application?
Also, to isolate the problem, can you create a new Oracle Form aplication
as simple as possible, and try to send the keys to see if the problem
persists.
There is tool named Spy++, you may try to use it to capture the message.
If I misunderstand your meaning, please feel free to post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "Miky" <le******@davinci.com>
Sender: "Miky" <le******@davinci.com>
References: <06****************************@phx.gbl> <O$**************@TK2MSFTNGP12.phx.gbl>
<07****************************@phx.gbl>
<uO**************@TK2MSFTNGP10.phx.gbl>Subject: Re: Ctrl-PgUp keys
Date: Sat, 8 Nov 2003 06:33:11 -0800
Lines: 43
Message-ID: <0a****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcOmBTxMN9KC2ohKQdic2lO7HppCQQ==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:154953
NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi,

I know that is bad :)

To make things worse :)... I don't think that the SendKeys
isn't working because in the program I send other sendkeys
to the same application (normal, such as numbers and
letters or 'Alt' combinations) and they work fine. On the
other side I wrote the program to see if the combination
is correct and it does :(

The application I am sending the sendkeys has been written
in Oracle forms and that combination allows me to move to
the next tab in a tab control.

Thanks.
-----Original Message-----
Hi LDV,

I was afraid you were going to say that! ;-)

It could be that the SendKeys isn't working or it

could be that the receiving program
isn't getting it.

To test the first you could write a simple program

which will simply report every
keystroke that it receives.

To test the second (hopefully you wrote it) you can

have it send keys to itself when
you click a button or something.

Another way to test it would be to use VbScript to do

the SendKeys.

Regards,
Fergus
.


Nov 20 '05 #8
Hi,

Thanks for your reply and sorry for the delay in my answer.

I tried to capture the keys sent to the Oracle application
by Spy and below are the results. Unlucky I cannot create
an Oracle form since I don't have the instruments to do so.

Sorry for the raw data but seems that I cannot insert an
attachment through the newsgroup web interface. It should
be legible on a legal landscape word document.

<00178> 002901C6 P WM_KEYDOWN nVirtKey:VK_F8 cRepeat:1
ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
[wParam:00000077 lParam:00010001 time:74:06:51.796]
<00179> 002901C6 P WM_KEYUP nVirtKey:VK_F8 cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
[wParam:00000077 lParam:C0000001 time:74:06:51.796]
<00180> 002901C6 P WM_KEYDOWN nVirtKey:VK_CONTROL
cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0
fUp:0 [wParam:00000011 lParam:00010001 time:74:06:55.796]
<00181> 002901C6 P WM_KEYDOWN nVirtKey:VK_NEXT cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
[wParam:00000022 lParam:00000001 time:74:06:55.796]
<00182> 002901C6 P WM_KEYUP nVirtKey:VK_NEXT cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
[wParam:00000022 lParam:C0000001 time:74:06:55.796]
<00183> 002901C6 P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
[wParam:00000011 lParam:C0000001 time:74:06:55.796]
<00184> 002901C6 P WM_KEYDOWN nVirtKey:VK_CONTROL
cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0
fUp:0 [wParam:00000011 lParam:00010001 time:74:07:00.796]
<00185> 002901C6 P WM_KEYDOWN nVirtKey:VK_NEXT cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
[wParam:00000022 lParam:00000001 time:74:07:00.796]
<00186> 002901C6 P WM_KEYUP nVirtKey:VK_NEXT cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
[wParam:00000022 lParam:C0000001 time:74:07:00.796]
<00187> 002901C6 P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1
ScanCode:00 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
[wParam:00000011 lParam:C0000001 time:74:07:00.796]

As you can see, the Ctrl-PageDown looks that is sent but
the application doesn't receive it. Is there a different
way to send keys to an application other than SendKeys
object?

Thanks in advance,
ME-LDV
-----Original Message-----
Hi leonardo,

Based on my understanding, you can send keys to any .NET Winformapplication. But you can not send Ctrl+Page Down key to an Oracle Formapplication.
If I misunderstand your meaning, please post here.
Have you tried to capture all the Key events of the Oracle Form applicationto see if the Ctrl+Page Down key has been sent to the application?Also, to isolate the problem, can you create a new Oracle Form aplicationas simple as possible, and try to send the keys to see if the problempersists.
There is tool named Spy++, you may try to use it to capture the message.If I misunderstand your meaning, please feel free to post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.--------------------
Content-Class: urn:content-classes:message
From: "Miky" <le******@davinci.com>
Sender: "Miky" <le******@davinci.com>
References: <06****************************@phx.gbl>

<O$**************@TK2MSFTNGP12.phx.gbl>
<07****************************@phx.gbl>
<uO**************@TK2MSFTNGP10.phx.gbl>
Subject: Re: Ctrl-PgUp keys
Date: Sat, 8 Nov 2003 06:33:11 -0800
Lines: 43
Message-ID: <0a****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcOmBTxMN9KC2ohKQdic2lO7HppCQQ==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:154953NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Hi,

I know that is bad :)

To make things worse :)... I don't think that the SendKeysisn't working because in the program I send other sendkeysto the same application (normal, such as numbers and
letters or 'Alt' combinations) and they work fine. On theother side I wrote the program to see if the combination
is correct and it does :(

The application I am sending the sendkeys has been writtenin Oracle forms and that combination allows me to move tothe next tab in a tab control.

Thanks.
-----Original Message-----
Hi LDV,

I was afraid you were going to say that! ;-)

It could be that the SendKeys isn't working or it

could be that the receiving program
isn't getting it.

To test the first you could write a simple program

which will simply report every
keystroke that it receives.

To test the second (hopefully you wrote it) you can

have it send keys to itself when
you click a button or something.

Another way to test it would be to use VbScript to
dothe SendKeys.

Regards,
Fergus
.


.

Nov 20 '05 #9
Hi Miky,

From the log, it seems the SendKeys has sent the keys to the Oracle Form.
Since the Oracle form will work, when you press keys on the keyboard.
You may try to capture the messages again then you press the keys on the
keyboard using Spy++.

Then you may try to compare if there is any difference between the two
methods.(Use sendkeys and Keyboard). I think this is the key point , if
they are the same, then I think you may need to know how the Oracle Form
handle the messages.

If you have any concern on this issue,please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Scott | last post: by
13 posts views Thread by Kai Grossjohann | last post: by
6 posts views Thread by Paul Gorodyansky | last post: by
12 posts views Thread by Wurm | last post: by
3 posts views Thread by Glen Hong | last post: by
2 posts views Thread by s99999999s2003 | last post: by
11 posts views Thread by Bookham Measures | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.