On Jan 12, 2007, at 1:14 PM, Paul Rehill wrote:
Thanks Terry RB's language reference does mention that the scrollbar can AcceptFocus to respond to arrow key presses on Windows only. I was trying to see if the window keydown event could intercept the arrow keys (or any key) but it wouldn't react to key strokes. I searched a couple of years of mail for keydown event, up arrow key, down arrow key etc and found some code like Msgbox Chr(Asc(Key)) to test for key strokes in the window's keydown event. I think this was it (as I have deleted it now).
That will show an empty MsgBox for non-printable characters like the arrow keys. It will show others though like A-Z, a-z, 1-9, etc.
If you want to see the ASCII number of the keypress, use: MsgBox str(Asc(Key))
The window is a shown as a modal window and has one scrollbar and two pushbuttons.
And that's it? No Canvas, ListBox or EditField? What is the scrollbar supposed to scroll?
The close push button is both the default pushbutton and the cancel pushbutton. Maybe these default settings are interfering with the window's ability to accept key strokes due to focus? I'm unsure.
No. The only thing that might interfere is a control that has a KeyDown event, has the focus and returns true. Controls KeyDown precede the Window's KeyDown event.
After unsuccessful attempts with the keydown event, I asked about the scrollbar as per my original post as it looks like correct behavior of a scrollbar under Mac OS X is to not respond to arrow keys.
That's correct. The scrollbar won't respond to any keypress on a Mac. Terry _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
