Solved

Capture F1 from icon

Posted on 1998-08-24
4
235 Views
Last Modified: 2010-04-04
I currently have an application that resides only in the system tray. Although I can access stuff with right-left-clicks, I would also like it to react when I press F1.  Does anyone know how to do this?
                  Thanks
0
Comment
Question by:jexd99
  • 2
4 Comments
 
LVL 3

Expert Comment

by:d4jaj1
ID: 1337602
Don't think you can because your system Tray "icon" won't have focus when the F1 key is pressed.  Either the Windows desktop has focus (the Windows default Help file will open) or the active window's application's help file will display.

The only way around this is to display your application and make sure it's active OR add a menu item to your system tray's popup-menu.

Any questions, let me know.

Jay
0
 

Author Comment

by:jexd99
ID: 1337603
Thank you for the response.  I would like to override the F1 key even if the systray app doesn't have focus.  This could be way to deep into windows OS system to override this function when another app has focus, but it is something I would like to do. In other words, if Netscape is open, and the icon app is in the system tray, pressing F1 would be intercepted by the app in the systray and perform it's function.  Does this make any sense? :-)
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 100 total points
ID: 1337604
jexd99

the only way to do this would be to run a system hook to trap the message of the f1 key been pressed...this could pose a problem as f1 is the standard default key for help files in all applications etc. but here is the API call you can use...

SetWindowsHookEx(WH_KEYBOARD, someDLL, nil, nil);

this is just a simple eg as to how it should look for mre detailed help check the win32.hlp file

Later
BoRiS
0
 

Author Comment

by:jexd99
ID: 1337605
Thanks, I will research this api command to see what it would take to do this task.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 135
Downloading email attachments 2 67
Error E2158 compiling with Delphi XE10 Seattle 2 83
Delphi inherited method 6 60
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now