🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by EB Mon, 21 Jan 2008 15:49
Function Key Assignment
#732
Author: EB
Date: Mon, 21 Jan 2008 15:49
5 lines
1074 bytes
I'd like to set up function keys, F1, F2, etc so that with one click a 
command is executed. For example press F1 and you go to a URL.
Thanks for any help.

EB 
Re: Function Key Assignment
#735
Author: Asger Joergensen
Date: Mon, 21 Jan 2008 20:10
18 lines
1204 bytes
Hi EB 
 
 EB says:
> I'd like to set up function keys, F1, F2, etc so that with one click a 
> command is executed. For example press F1 and you go to a URL.
> Thanks for any help.

Set 
KeyPreview = true;
on the form and then You can examine the Key in the form keydown
event and act accordingly.

if(Key == VK_F1)
  ShellExecute......

Kind regards
Asger
Re: Function Key Assignment
#741
Author: EB
Date: Tue, 22 Jan 2008 17:49
25 lines
1706 bytes
Thank you for your response. I forgot to say that I use BCPPB 6.
Your suggetion works as long as the app is running. I want to run the app at 
start time and program the keys to stay even when the app exits.
EB

"Asger Joergensen" <junk@Asger-P.dk> wrote in message 
news:MPG.21ff1ab13c71ec1989a12@newsgroups.borland.com...
>
> Hi EB
>
> EB says:
>> I'd like to set up function keys, F1, F2, etc so that with one click a
>> command is executed. For example press F1 and you go to a URL.
>> Thanks for any help.
>
> Set
> KeyPreview = true;
> on the form and then You can examine the Key in the form keydown
> event and act accordingly.
>
> if(Key == VK_F1)
>  ShellExecute......
>
> Kind regards
> Asger 
Re: Function Key Assignment
#744
Author: Asger Joergensen
Date: Wed, 23 Jan 2008 12:42
16 lines
1481 bytes
Hi EB 
 
 EB says:
> Thank you for your response. I forgot to say that I use BCPPB 6.
> Your suggetion works as long as the app is running. I want to run the app at 
> start time and program the keys to stay even when the app exits.
> EB

I don't know how to do it, but this link will take You to
a search for keyboard hooks which, I think, is what You need.

http://tinyurl.com/2qpcpp

Kind regards
Asger
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads