On Apr 7, 2007, at 11:00 PM, Jayson Garrett wrote:

> I’ve got a window that has nothing on it but a statictext and several
> canvas-based controls. The canvas controls all have AcceptFocus set to
> False, though from what I gather, this property only applies to  
> Macintosh.
>
> I’m using the Window.KeyDown event to trap keystrokes which I use  
> to then
> update the display of the canvases.
>
> This works fine on OS X, but on Windows, keystrokes don’t seem to  
> have any
> effect at all. It's as if the Window.KeyDown event isn't even  
> firing. In
> another application, I get incessant beeping from keystrokes in  
> Windows, but
> in a cruel twist of fate, I’m not even getting *that* in this app. :)
>
> I’ve tried using WindowName.SetFocus, to make sure that the  
> window's KeyDown
> handler is what's handling the keystrokes, but that doesn’t seem to  
> help.
>
> Does anyone have any idea what I’m doing wrong, or where I can look  
> to solve
> this problem?

I agree that Windows has difficult issues with KeyDown events. I have  
resorted to creating an offscreen edit field, setting focus to it,  
and handling the keys I want within the EF's keydown event. This has  
worked well for me. The same code also works on  a Mac

HTH


Roger M. Clary
Class One Software
http://www.classonesoftware.com
[EMAIL PROTECTED]

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to