473,395 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C# : How to Recognize key pressed App in Systray

487 Expert 256MB
How to Recognize key pressed when the application is in system tray?

I am using a context menu with some hot keys (like Alt+Ctrl+Delete) once I press the key my appropriate command should trigger.
Can any one Point me to Recognize key pressed when the application is in system tray

Front end : C#.Net or C# 2005

Thank you
Oct 17 '07 #1
5 2089
Plater
7,872 Expert 4TB
I have always found this page usefull for performing those tasks:
Global Hooks
Oct 17 '07 #2
CyberSoftHari
487 Expert 256MB
That's good point but i am getting error in

Expand|Select|Wrap|Line Numbers
  1. throw new Win32Exception(errorCode); 
This line, it is Throwing an exception like

Win32Exception was unhandled
The operation completed successfully.

Unable to find?
Attached Images
File Type: jpg ex1.JPG (15.6 KB, 125 views)
Oct 18 '07 #3
CyberSoftHari
487 Expert 256MB
Did any one got this error before?

Win32Exception was unhandled
The operation completed successfully.
Oct 18 '07 #4
Plater
7,872 Expert 4TB
That's an error comming from the unmanaged code (somewhere in the DLLImport) I'm not even sure you can try/catch those.
I've never gotten them with the global hooks stuff.
Oct 18 '07 #5
CyberSoftHari
487 Expert 256MB
I am using C# 2005
If i open directly and run it that's working good
but if i import those modules to my project, it showing that error.
Oct 18 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Yo | last post by:
I want to put an icon in the systray. I don't think VBA does this. Is there a VC++ or C++ Function or Sub that I can declare that will allow me to create a systray icon (or is it...
0
by: charlesh3 | last post by:
Hi - I'd like to write a VB6 program to add a couple of text based clocks (for different time zones) to the systray so they'll always be visible. I can add an icon to the systray, but the API's...
6
by: Action | last post by:
I can add a systray icon in normal windows application... but when i do it in windows service, the systray icon just don't show up is that because i don't have any "component" to contain the...
3
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me...
4
by: mario | last post by:
How to put an application in systray with F1 or any shortcut button?
1
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's...
0
by: kapcreations | last post by:
I have a system tray app which gets the status of a windows service, and displays the appropriate icon for the status of the service in the systray. the problem I am having is the icon disapears...
8
by: Rob R. Ainscough | last post by:
I have a VS 2005 Windows Service with a Installer project as part of my solution. The Service installs fine but I can't seem to make either of these work: 1. Have the service start after...
2
by: Arvi | last post by:
Hello, Im quite new to c# windows application. i need to write a application which stays on the systray and listens to the SQL Table. (when the value is inserted as 0 - done thru Dataset and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.