473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change notifyIcon during runtime. You may think it's simple but..

soulstace
3 New Member
Hi all,

I have a project with two forms. Call them form1 and form2.

On form1, I have a notifyIcon which appears in the system tray when the application starts.

On form2, I have a textbox, browse button, and an openFileDialog.

Now,

On form2, when I browse for and choose an Icon, I want the icon to be applied to form1.notifyIco n.Icon property.

Can anyone help me out with this? I have all the code in which sets the icon. The only thing I don't understand is how to change icon from form2 without creating new instance of form1 class.

When I create a new instance of form1 class I end up with two form1s open on the screen.

Thanks in advance for your help!



~ss
Aug 29 '06 #1
1 5348
soulstace
3 New Member
Solved.

Pardon me for not searching harder the first time. Sometimes it's hard to know what to search for. This time I got lucky :)

http://www.thescripts. com/forum/thread528104.ht ml
Aug 29 '06 #2

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

Similar topics

0
1583
by: petterl | last post by:
I have tried to find the error in the code below but I always get " An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module. Additional information: Object reference not set to an instance of an object." and then
13
6074
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which during production. Usually, this only wraps code used to control quitting the whole app versus just shutting a form, but it can also control many...
0
3549
by: Chanh Nguyen | last post by:
Hi all, I have a problem. I want an application that sends a message to a NotifyIcon application (Tray Icon). I have a form MainFrm that will create the NofifyIcon. static void Main() {
1
5675
by: Artur Kowalski | last post by:
I have a NotifyIcon in my Windows Service project and I am trying to add a ContextMenu to this NotifyIcon or use some of the mouse events. Everything isn't working. I think so base class of the service System.ServiceProcess.ServiceBase don't catchWindows messages like mouse or timer messages. Any Idea? Thanks,
3
2098
by: Me | last post by:
I'm getting a NullReferenceException in Unknown Module when I follow the below steps to create a simple NotifyIcon app that creates the context menu on the fly(see a little analysis after the steps). 1. Create a new Windows Forms C# solution (I called mine DBChanger). 2. Replace Form1.cs code with this: -------------------- using System;
2
2853
by: Scatropolis | last post by:
I'm trying to create Images/Bitmaps during runtime and converting them to icons so I can use them for the NotifyIcon class. I searched but couldn't find anything about this. I know all about creating images and editing them...it's the "getting the image to the tray" part that's getting me. Thanks
1
6050
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while during the runtime, the user can click on a button and change the connection string without exiting the application. I would really appreciate...
0
486
by: nospam | last post by:
I have an application that is made up of a single module for my global variables and then multiple classes. There is no form. I am using a notifyicon as my notification(Basically different colored icons). All functions for the notifyicon work great except for the showballoontip. I have configured it many ways, but basically I want:...
1
4286
by: \Ji Zhou [MSFT]\ | last post by:
Hello Jason, Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou and I will be working on this issue with you. I have tried to but cannot reproduce your issue on my side. From your codes, I think the logical is, every time the Timer's elapsed event fires, we call the Check_For_Version_Update() function. From the...
0
7843
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...
0
8206
Oralloy
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. ...
0
8340
jinu1996
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...
1
7967
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...
0
6621
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...
0
5392
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...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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...

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.