Hello all,
I am trying to write a simple app with no forms, but which uses a system
tray icon and a context menu. I want to set the icon for the NotifyIcon to
the icon which is set for the application in the My Project settings dialog.
How can i get this icon?
Thanks in advance.
- Arthur Dent. 3 1461
> I am trying to write a simple app with no forms, but which uses a system tray icon and a context menu. I want to set the icon for the NotifyIcon to the icon which is set for the application in the My Project settings dialog.
Assuming the name of the icon is xxx, try this
Dim s as string = Application.Pro ductName & ".xxx.ico"
Icon = New
Icon(Reflection .Assembly.GetEx ecutingAssembly .GetManifestRes ourceStream(s))
Actually, i found i think an easier way, though maybe not the "proper" way?
I wound up doing
myNotifyIcon.Ic on =
System.Drawing. Icon.ExtractAss ociatedIcon(App lication.GetExe cutablePath())
"AMercer" <AM*****@discus sions.microsoft .com> wrote in message
news:F9******** *************** ***********@mic rosoft.com... I am trying to write a simple app with no forms, but which uses a system tray icon and a context menu. I want to set the icon for the NotifyIcon to the icon which is set for the application in the My Project settings dialog.
Assuming the name of the icon is xxx, try this
Dim s as string = Application.Pro ductName & ".xxx.ico" Icon = New Icon(Reflection .Assembly.GetEx ecutingAssembly .GetManifestRes ourceStream(s))
> Actually, i found i think an easier way, though maybe not the "proper" way?
In my case, I have a few icons as embedded resources in my exe file, and I
can get at any one by name with the fragment in my previous post. In your
case, you want the icon associated with the app, so I think you are doing
exactly the right thing. Also, your code will work in any app without the
code needing to know the icon name, and that is a plus in my opinion. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Jarman |
last post by:
Apologies in advance for the long post - I wanted to be sure I included all
the relevant details. The answer is probably very, very simple.
I am doing something stupid here, but I don't know what it is. I'm writing
an application with a Tkinter GUI (Python 2.4, Tcl/Tk 8.4.) and I want to
put a custom icon on the main window.
I've followed (so far as I understand it) the recipe in the eff-bot's
splendid Introduction to Tkinter - see:...
|
by: Matthew Fitzpatrick |
last post by:
when multiple similar forms are opened up, windows xp can group them into an
application group button on the start bar.
Unfortunately, this application group uses the icon of the application's
executable, and not the icon that has been specified by form.
another usenet post here (watch for URL wrap)
...
|
by: Sam |
last post by:
I've been googling for a couple of hours now and tried some different
things, but I've been unable to get the icon for a distributed access
application to do anything but display the default microsoft access
icon. I've included the icon with the distribution and specified it as
the application in the icon in the wizard, but no love from Access.
Any help with this will me much appreciated.
Thanks,
Sam90
|
by: Wayne |
last post by:
I currently have an app whose Icon I am setting. I want to set the icons in
my forms at run time to that of the application icon. How do I retrieve the
application Icon so that I can use it for my forms? once retrieved can I
just set the form Icon? or do I need to do something special?
Thanks
Wayne
|
by: Paul |
last post by:
In other development environments i've used the IDE had
facilities to create custom icons for the application and
files it created. It would be nice to have a custom icon
for a created file, but it is more important to give the
application its own icon. I've looked in over ten books in
VB.net programming and none of them cover this issue. How
do I do it or where do I find the info?
Thanks,
| |
by: Randall Powell |
last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging services via email and a customized event log viewer. An additional goal is to have the service provide a visual status indicator via an icon to be located in the Taskbar status area. The NotifyIcon component appears to be a logical candidate and worked...
|
by: QLD_AU |
last post by:
Is their a way in a VB.Net application to set all sub form icons to the main
form ? or even set all icons to the Application icon, without having to
reference the icon as a filename ?
With Thanks
Jason
|
by: Supercox |
last post by:
I am on a team programming a VB.NET application (called "Alternate Benefit
Calculator" or ABC for short) and I have been preparing our program for
deployment. I have several questions pertaining to the deployment
application in Visual Studio.NET.
First question: I need to add some data files into the deployment
application, but I do not want them uninstalled when the program is
uninstalled through ADD/REMOVE programs. These are XML,...
|
by: randy1200 |
last post by:
I have a Windows application that previously had the company logo
"MyCompany.ico" added to the upper left-most corner. The company has since
issued a new version of "MyCompany.ico" that looks completely different.
I overwrote the old ico file with the new ico file and re-ran the program. I
still see the old logo at run-time.
I right-clicked the project-> Add Existing Item-> added the new ico file. I
set the build action to Embedded...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |