 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Phil Guest
|
Posted: Fri Feb 06, 2004 12:32 am Post subject: Using the F10 (function key) in DELPHI - Taboo? |
|
|
Greetings to all ...
I am tempted to use the F10 (function key) in my Delphi apps, however,
I have read somewhere (I cannot remember where) that it is * NOT*
recommended using the F10 key.
Could someone please refresh my memory as to why you should
not use this key . ANy details would be greatly appreciated!
-
Phil Tusa
|
|
| Back to top |
|
 |
Christophe Geers Guest
|
Posted: Fri Feb 20, 2004 10:11 am Post subject: Re: Using the F10 (function key) in DELPHI - Taboo? |
|
|
Phil,
F10, like for example the F1 key have a "standard" meaning in Windows
applications and really shouldn't be used for any other purpose. (But
ofcourse customers often view things otherwhise.)
Normally the F10 key is used to toggle the main menu of an application.
(You can also achieve this by tapping the Alt-key). Shift-F10 also has a
default meaning, it makes the popupmenu of the active control appear.
When you press the F10 key it will not arrive as a WM_KEYDOWN message
but rather as a WM_SYSKEYDOWN message. Above I mentioned why this is the
case .
Is is *recommended* that you just leave this alone and stick with the
default Windows user interface. Customers are strange beasts, they want
this and that, but it is advisable to make sure that your application
reacts the same as other Windows applications.
Below is a little code snippit on how to trap the F10 key.
procedure TForm1.HandleMessage(var Msg: TMsg; var Handled: Boolean);
begin
if Msg.message = WM_SYSKEYDOWN then
if Msg.wParam = VK_F10 then
begin
Memo1.Lines.Add('F10');
Handled := True;
end;
if Msg.message = WM_KEYDOWN then
Memo1.Lines.Add('An other key');
end;
Regards,
Christophe Geers
And remember, Google is your friend.
|
|
| Back to top |
|
 |
Christophe Geers Guest
|
Posted: Fri Feb 20, 2004 10:12 am Post subject: Re: Using the F10 (function key) in DELPHI - Taboo? |
|
|
And this question has nothing to do, with the Database Desktop. Please
post in the appropriate newsgroups. (I should have replied in the first
place, sigh)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|