compactframework >> Directional Pad Scrolling

by UEI » Wed, 27 Jul 2005 10:00:03 GMT

I am trying to handle the Directional Pad available on Dells and HPs. Many of
the posts here and elsewhere indicated these donot have to be registered
(like the other 4 hardware buttons by the app), and they generate the regular
KeyDown & KeyUp Events (w/ up-down key codes).
I am using .NET CF SP3 and still cannot get these events fired in my custom
control. Any ideas why this is happening? MS says in SP2 release notes that
Key events are now enabled on controls too.
The event is fired in a form but not in my custom control.

Thanks
PB.

compactframework >> RE: Directional Pad Scrolling

by UEI » Thu, 28 Jul 2005 09:56:04 GMT


I found the problem!
Apparently, the control that I was expecting to get the KeyDown event did
not have focus. And so the event was not fired at this control.

compactframework >> Directional Pad Scrolling

by Daniel Moth » Thu, 28 Jul 2005 17:19:02 GMT

Well done and thanks for the update! Just fyi, with netcf v2.0 you'll be
able to set the Form.KeyPreview property to true which could help in
scenarios like this...

Cheers
Daniel

Similar Threads

1. scrolls scrolls scrolls scrolls scrolls ............... - Asp.Net

2. Directional buttons on Pocket PC device

Xin,

My app need the ability to handle the up/down arrow keys at the form
level -- just like Jono's app. I'm no expert in such things, but I believe
your answer is not quite the whole story.

I thought the KeyDown event handler wouldn't work for "special" keys like
up/down arrows because those keys are first examined by the control with the
focus. These keys are handled by the control and not passed up the line to
the form.

In the full framework the form's KeyPreview property is just the ticket for
this sort of thing. Unfortunately, it's not available in the CF. AFAIK the
only way to produce the same effect is to have ALL controls derive from
their usual base classes and implement an override to the IsInputKey method.
In this method you would have to permit the "special" keys to pass up the
line to the form-level event handler.

If there is a simpler technique to simulate KeyPreview, I'd love to hear
about it.

Thanks.
Richard Kucia

"Xin Yan" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> Use Form.KeyDown event handler.
> Thanks
> Xin
> --------------------
> | Content-Class: urn:content-classes:message
> | From: "Jono" < XXXX@XXXXX.COM >
> | Sender: "Jono" < XXXX@XXXXX.COM >
> | Subject: Directional buttons on Pocket PC device
> | Date: Tue, 10 Jun 2003 11:25:16 -0700
> | Lines: 8
> | Message-ID: <029401c32f7d$a409d0b0$ XXXX@XXXXX.COM >
> | 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: AcMvfaQJTqjdSs1+Qam+dL+k0u5Ewg==
> | Newsgroups: microsoft.public.dotnet.framework.compactframework
> | Path: cpmsftngxa06.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl
> microsoft.public.dotnet.framework.compactframework:25354
> | NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
> | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
> |
> | How can i programmably access the directional buttons on
> | the Pocket PC devices? I'm using VS 2003 with .net
> | compact framework.
> |
> | Another question, are the mouse events [especially mouse-
> | down] valid for picturebox when deploying the program
> | onto a real Pocket PC device? Apparently it works for the
> | emulator.
> |
>


3. Implementing directional keypad

4. Bi-Directional Communication from MFC to Managed Com

I have an old MFC application that I'm now compiling in .net and have a C# 
COM DLL, with a window interface, that I'm accessing with out any problems.  
However, how do I get the COM DLL  to be able to call back to the MFC 
application?  I have been looking for an example and I have found nothing.

Also can I pass my MFC window handle to the COM Dll so the message boxes 
inside the DLL can use it to stay on top? 

Larry 

5. Bi-directional communication between IE(aspx) and embedded Win Ctrl

6. Bi-directional communication between IE(aspx) and embedded Win

Dear Ying-Shen Yu,
I believe this would work in the case of communication from the embedded IE .NET control to IE itself.

Therefore your code sample:
//PrintCtrl embedded IE object
[DispIdAttribute(0x60020001)]
void MyByteEvent( ref byte[] bytes);

would allow me to do something like this in Javascript (IE):
//PrintCtrl is the id on the <OBJECT> tag
         function PrintCtrl::MyByteEvent( ref byte[] bytes)
            {   //setting value to html element via javascript DOM             
                document.all.myForm.bytes.value = bytes;
            }


That is fine, but I need to pass a byte[][] from code-behind (aspx.cs) to the embedded I.E. control, which would be the reverse (opposite) of the above sample.

Do you know how this can be accomplished ? 

Thanks in advance.

""Ying-Shen Yu[MSFT]"" wrote:

> Hi,
> 
> have you tried defining the method in your event source interface like 
> below:
> 
> [DispIdAttribute(0x60020001)]
> void MyByteEvent( ref byte[] bytes);
> 
> It works fine in VB6, please feel free to reply this thread if it does not 
> work in script languages.
> Thanks!
> 
> Best regards, 
> 
> Ying-Shen Yu [MSFT]
> Microsoft Community Support
> Get Secure! - www.microsoft.com/security
> 
> This posting is provided "AS IS" with no warranties and confers no rights.
> This mail should not be replied directly, please remove the word "online" 
> before sending mail.
> 
> 

7. Bi-directional Asynchronous Communication

8. Bi-Directional Remoting Problem in the Internet