Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > VB.NET > Windows Forms

Windows Forms Discussion related to Winforms application development

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2009, 12:48 PM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Dec 2008
Posts: 7
Reputation: 0
RichardLee is on a distinguished programming path ahead
Default How can I display text in the system tray?

I have looked on the net for demos of how to display a text message in the system tray, but all I can find are examples which say you need to use trayicons. Where you render your string into a bitmap, and then point the trayicon at the bitmap to display it.

Unfortunately this is no good for what I want to do, the trayicon is limited to only 16x16 pixels, and I want to display a longer message, which will just not fit. I can't resize the size of the icon, and if I make the source bitmap larger, it just gets scaled to fit within the 16x16 space (crushing it together into an awful mess)

So I tried using an array of trayicons and split the bitmap between them, but this also fails, because windows inserts about 3-4 pixels of padding between each tray icon.

So at the moment I am all out of ideas, but I know this is possible because I have seen other applications which can render text of any length into the system tray. Take tClock for instance.



Anyone got any ideas on how I should proceed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-03-2009, 5:23 PM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

You can't use ShowBalloonTip method?
Anyways, perhaps you're thinking about (except clock ) a desk band, see Creating Custom Explorer Bars, Tool Bands, and Desk Bands, if so this library may also help Extending Explorer with Band Objects using .NET and Windows Forms.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-06-2009, 6:11 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Dec 2008
Posts: 7
Reputation: 0
RichardLee is on a distinguished programming path ahead
Default

"You can't use ShowBalloonTip method?"

No because its not a popup that I want.

Lets say for the sake of argument, that it is my current IP address that I want to display in the system tray.

That link to the bands is interesting, giving me the possibility of placing text almost anywhere I would like, except the one place that I actually need it. So its close, but still no cigar.

Last edited by RichardLee; 07-06-2009 at 6:18 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-06-2009, 7:33 AM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

I think a desk band in taskbar placed next to the tray icons is as close as you get.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-06-2009, 8:33 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Dec 2008
Posts: 7
Reputation: 0
RichardLee is on a distinguished programming path ahead
Default

Quote:
Originally Posted by JohnH View Post
I think a desk band in taskbar placed next to the tray icons is as close as you get.
Thanks, but no thanks.

I know this is achievable, I have already provided an example showing an application which works in the way I want, if they can do it in C++, then why is it not possible in VB.net?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-06-2009, 9:55 AM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

I don't see you have given any example, the image you posted show custom text for system clock. I also haven't seen this in any other Windows application, desk bands are common, but not text in the icon area itself.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 1:11 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.