473,804 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Window's System Tray Icon

When I add a USB key, system tray icon on Windows XP shows USB icon. It also
shows icon that can be used to "Safely Remove Hardware". I would like to use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIco n() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn’t see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.
--
Asif
Aug 1 '06 #1
2 1939
When I add a USB key, system tray icon on Windows XP shows USB icon. It
also
shows icon that can be used to "Safely Remove Hardware". I would like to
use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIco n() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn't see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.
Undoubtedly there is a better solution for this, but this is what I do when
I want to use specific icons.

make a screenshot of the desktop when the desired icon is visible.
Then paste it in mspaint, set the zoom to large, and then select and copy a
32x32 bit region.

Then, in a VS project, create a new icon resource and paste the copied
bitmap inside.
The use that in the project.

It may be a bit clunky, but it works.

--

Kind regards,
Bruno van Dooren
br************* *********@hotma il.com
Remove only "_nos_pam"
Aug 1 '06 #2
"Bruno van Dooren [MVP VC++]" <br************ **********@hotm ail.comwrote
in message news:OR******** ******@TK2MSFTN GP03.phx.gbl...
>When I add a USB key, system tray icon on Windows XP shows USB icon. It
also
shows icon that can be used to "Safely Remove Hardware". I would like to
use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIco n() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn't see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.

Undoubtedly there is a better solution for this, but this is what I do
when I want to use specific icons.

make a screenshot of the desktop when the desired icon is visible.
Then paste it in mspaint, set the zoom to large, and then select and copy
a 32x32 bit region.

Then, in a VS project, create a new icon resource and paste the copied
bitmap inside.
The use that in the project.

It may be a bit clunky, but it works.
But be aware that icons are generally subject to copyright laws, so if you
grab a screenshot of someone else's icon and use it in your program, you may
be crossing the line from a legal standpoint.

-cd
Aug 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4752
by: Austin | last post by:
I wrote a GUI program with wxPython. In the window, there are 3 attributes on left top. "_" could let the program to minimize to tool bar. I want to let the program minimized to the system tray. Is there any way to let the window have 4 attributes? "." "_" "O " "x"
6
9925
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 systray icon? please give direction... thx
4
7996
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other color/image and I needed single click, double click event and context menu also on that tray icon to perform some other operation and show some window form.
4
1909
by: Tony Vitonis | last post by:
Hello. I've written an app that I want to "live" in the system tray. I want it to start up with just a tray icon showing, and if the user selects "Settings..." from the icon's context menu, to display a window that will allow him to change settings. When he hits "OK" or "Cancel", the window should hide again. At first, I tried putting a "Me.Visible = False" in the form's Load event, but apparently that code runs before the command can...
7
2685
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user clicks on it, a clock-in/out form is displayed. My problem is this: I've added a timer to the main module to allow the user to set a time to be reminded that they should clock back in/out. The timer works great (i.e. if it's set to remind you at...
4
5665
by: Tom | last post by:
Hello, System tray icon informs users that the apps is running in the background. However, there are instances that the app might crash and after that the app icon in the system tray is still displayed. It goes away when the mouse is pointed over the icon. I wonder if there is any way to force system tray refresh during the VB.NET app crash? I tried to add some code in the finalize but it didn't do anything. I think
3
1823
by: Stanley | last post by:
Hi all the helpful people out there! I want to dectect system tray so that when an icon is added to the tray, it will alert me! Just like the Printer icon appear with someone prints! Thanks in advance!
1
2066
by: Janiv Ratson | last post by:
Hello, I have an MFC MDI application and a Windows Forms (2.0) Tray Icon application. I want to run a command on the tray application via my MFC application. There is a "Register" context menu command on the tray icon application. I want to call the Register command from my MFC MDI application. I thought of a windows message. How do I do it?
1
1327
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, how can i remove/disable the tray icon for the started Express Edition from the system tray. Te icon directs me to the express editons website after clicking on it. I dont want these tray icon. It will be shown for any Express Edition: C#,VB,VC++,... Thanks in advance,...
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10351
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.