473,385 Members | 2,014 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,385 software developers and data experts.

System Tray Help Please

BJ
I am trying to add my application to the system tray. I am
not using the built in control becuase of the limitation
that you can not use the balloon tool tip feature. I have
done this succesfully in vb6 but when I try it in vb.net I
get the system tray to work but there is no icon in the
system tray. I know it is working because I can get the
balloon tip to appear and where the icon is supposed to be
there just isn't an icon. just a blank space. I am going
nuts as to why I can't get an icon to show up. Plus how do
I handle the user clicking on the icon? In vb 6 I used to
put .uCallbackMessage = WM_MOUSEMOVE in the NOTIFYICONDATA
data structure...now this does not work. And neither does
popUpMenu. I am really curious as to why this was so easy
in vb6 but now it is almost impossible to do in vb.net.
Btw just to test I have used the built in control and my
icon adds to the taskbar that way. Can anyone help me out
please. Here is my code

With uNIF
.cbSize = Marshal.SizeOf(uNIF)
.hwnd = Me.Handle
.uID = 1
.dwInfoFlags = NIF_ICON Or NIF_MESSAGE
.uCallbackMessage = New IntPtr(&H500) <-- WHAT
SHOULD GO HERE?
.uVersion = NOTIFYICON_VERSION
.hIcon = Me.Icon.Handle <-- DOES NOT WORK
End With
Result = Shell_NotifyIcon(NIM_ADD, uNIF)
With uNIF
.uFlags = NIF_INFO
.uVersion = 2000
.szInfoTitle = "Test"
.szInfo = "Testing 1,2,3 Testing"
.dwInfoFlags = NIIF_INFO
End With
Result = Shell_NotifyIcon(NIM_MODIFY, uNIF)

Thanks in advance.

BJ
Nov 20 '05 #1
5 3018
On Thu, 11 Dec 2003 08:14:07 -0800, BJ wrote:
I am trying to add my application to the system tray. I am
not using the built in control becuase of the limitation
that you can not use the balloon tool tip feature. I have

Try these links:

http://www.codeproject.com/useritems...get=NotifyIcon

http://www.codeproject.com/csharp/no...get=NotifyIcon
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #2
These are all for C#. Is there anything for VB.NET???

Thanks again.
-----Original Message-----
On Thu, 11 Dec 2003 08:14:07 -0800, BJ wrote:
I am trying to add my application to the system tray. I am not using the built in control becuase of the limitation that you can not use the balloon tool tip feature. I
have

Try these links:

http://www.codeproject.com/useritems...otifyIconEx.as p?target=NotifyIcon
http://www.codeproject.com/csharp/notifyballoon.asp? target=NotifyIcon

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mailaddress.
.

Nov 20 '05 #3
On Thu, 11 Dec 2003 09:44:48 -0800, <an*******@discussions.microsoft.com>
wrote:
These are all for C#. Is there anything for VB.NET???

Thanks again.
-----Original Message-----
On Thu, 11 Dec 2003 08:14:07 -0800, BJ wrote:
I am trying to add my application to the system tray. I am not using the built in control becuase of the limitation that you can not use the balloon tool tip feature. I

have


Try these links:

http://www.codeproject.com/useritems...otifyIconEx.as

p?target=NotifyIcon

http://www.codeproject.com/csharp/notifyballoon.asp?

target=NotifyIcon


--
Chris

To send me an E-mail, remove the underscores and

lunchmeat from my E-Mail
address.
.


There may be on CodeProject, but I didn't really look for them. I just
thought that those would give you some hint. I think one of them is a
control, so you can just reference it in your project and use it (I may be
wrong about that, however).

You can also try this one. It's not strictly a NotifyIcon, but you may be
able to use it. Also C# but a full control that you can call from VB.Net.
It has a VB.Net project included.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #4
On Thu, 11 Dec 2003 09:44:48 -0800, <an*******@discussions.microsoft.com>
wrote:
These are all for C#. Is there anything for VB.NET???

Thanks again.
-----Original Message-----
On Thu, 11 Dec 2003 08:14:07 -0800, BJ wrote:
I am trying to add my application to the system tray. I am not using the built in control becuase of the limitation that you can not use the balloon tool tip feature. I

have


Try these links:

http://www.codeproject.com/useritems...otifyIconEx.as

p?target=NotifyIcon

http://www.codeproject.com/csharp/notifyballoon.asp?

target=NotifyIcon


--
Chris

To send me an E-mail, remove the underscores and

lunchmeat from my E-Mail
address.
.


Here's one more, for VB.Net

http://www.dnzone.com/ShowDetail.asp?NewsId=334
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #5
I used to do the same thing in VB6. In .NET use the
NotifyIcon component (under Window Forms in the toolbox).
You can set the Icon property to the desired icon and the
Text property to the desired tooltip. There are events
for Click, DoubleClick, MouseDown, MouseOver, and MouseUp.
-----Original Message-----
I am trying to add my application to the system tray. I amnot using the built in control becuase of the limitation
that you can not use the balloon tool tip feature. I havedone this succesfully in vb6 but when I try it in vb.net Iget the system tray to work but there is no icon in the
system tray. I know it is working because I can get the
balloon tip to appear and where the icon is supposed to bethere just isn't an icon. just a blank space. I am going
nuts as to why I can't get an icon to show up. Plus how doI handle the user clicking on the icon? In vb 6 I used toput .uCallbackMessage = WM_MOUSEMOVE in the NOTIFYICONDATAdata structure...now this does not work. And neither doespopUpMenu. I am really curious as to why this was so easyin vb6 but now it is almost impossible to do in vb.net.
Btw just to test I have used the built in control and my
icon adds to the taskbar that way. Can anyone help me outplease. Here is my code

With uNIF
.cbSize = Marshal.SizeOf(uNIF)
.hwnd = Me.Handle
.uID = 1
.dwInfoFlags = NIF_ICON Or NIF_MESSAGE
.uCallbackMessage = New IntPtr(&H500) <-- WHATSHOULD GO HERE?
.uVersion = NOTIFYICON_VERSION
.hIcon = Me.Icon.Handle <-- DOES NOT WORK
End With
Result = Shell_NotifyIcon(NIM_ADD, uNIF)
With uNIF
.uFlags = NIF_INFO
.uVersion = 2000
.szInfoTitle = "Test"
.szInfo = "Testing 1,2,3 Testing"
.dwInfoFlags = NIIF_INFO
End With
Result = Shell_NotifyIcon(NIM_MODIFY, uNIF)

Thanks in advance.

BJ
.

Nov 20 '05 #6

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

Similar topics

1
by: balu | last post by:
Hello , I Had a problem in developing a application for getting a message over or above system tray . When we first logon into the yahoo messenger , whenever a new user logon ,The messenger...
1
by: Luck | last post by:
Hi, could someone please lead me in the right direction? I'm trying to write a program which will reside on the system tray. I for the user to be able to: (1) See an icon in the system tray (2)...
1
by: Tulasi Kumar | last post by:
I am able to add my application to system tray. The problem here is, I want to add more number of instances(System tray icons) of the a single application to the system tray. How to overcome...
10
by: Crouchie1998 | last post by:
Hello To All You Real Programmers Out There!! There is an application called: "Tray It" Webpage: ---------- http://www.teamcti.com/trayit/trayit.htm Direct Download:
5
by: bipi | last post by:
Dear everyone, In my application, I kill process by: private bool KillProcess(String processName) { bool result = false; Process process = Process.GetProcessesByName(processName); for (int...
0
by: kissii | last post by:
Hi , i am new to VB. I want to know what are the processes running in system. what i am thinking is if i can get how to access system tray information, i can get all the processes/services...
0
by: salahuddin23 | last post by:
I am making a program to run my windows service from system tray, i added Service controller class and all is woking except to put it in system tray. As in VB.NET we can have Application.Run() method...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
3
by: Usman Jamil | last post by:
Hi I've a windows application that does a lengthy backup process. While the process is going on, I need to show a progress bar inside system tray or just above the system tray. Can someone...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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,...
0
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...

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.