?
Solved

Text in System Tray

Posted on 2001-06-17
18
Medium Priority
?
259 Views
Last Modified: 2010-05-02
I'm working on making a clock (like the system clock, except made by me), and I really need to know how I can add text to the system tray.  I found out how to add icons, but not text!

Please help!  Any comments or anything would be appreciated.

Preferably, I'd like it so that I can treat it almost like a label, or text box, something that I can easily edit the colors, background colors, etc.  Like:

statusbartext.backcolor = (whatever)

and

statusbartext.text (or caption) = "whatever"

Thank you so much!

75 pts is all I got :(

-Sam
0
Comment
Question by:samsonite_VB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +4
18 Comments
 
LVL 15

Accepted Solution

by:
ameba earned 152 total points
ID: 6200653
>I found out how to add icons, but not text!
You should add icon to systray.  Here is how to modify icon:

' Form1, add textbox, picturebox and Imagelist (dimensions 16x16)
Option Explicit

Private Sub Form_Load()
   Picture1.AutoRedraw = True
   Picture1.BorderStyle = 0
   Picture1.Width = 16 * 15
   Picture1.Height = 16 * 15
   Picture1.Font = "Small Fonts"
   Picture1.FontSize = 6
   Picture1.BackColor = vbWhite
End Sub

Private Sub Text1_Change()
   On Error Resume Next

   Picture1.Cls
   Picture1.Print Text1.Text
   ImageList1.ListImages.Remove "status"
   ImageList1.ListImages.Add , "status", Picture1.Image

   Set Me.Icon = ImageList1.ListImages("status").ExtractIcon

End Sub

Please, do not accept this comment 'as answer' if it isn't for A grade.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6201291
For a different approach: http://www.geocities.com/timcottee/downloads/traywindow.zip

This sample project allows you to place an entire form in the system tray and have buttons/labels etc active within it.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Expert Comment

by:nutwiss
ID: 6201526
tim - your link's dead....

that's geoshitties for you :)
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6201555
nutwiss, this happens many times. If you go to http://www.geocities.com/TimCottee and click the downloads link you should get there. Don't ask me why the link is dead, I copied it straight off the page myself!
0
 
LVL 15

Expert Comment

by:ameba
ID: 6201599
It's problem with geocities server. To download file, right-click and select 'Save Target As'

I found their mirror server with prefix 'us.share' to always work with zip files:
http://us.share.geocities.com/timcottee/downloads/traywindow.zip
0
 
LVL 15

Expert Comment

by:ameba
ID: 6201613
>mirror server with prefix 'us.share' to always work

This is the first time that doesn't work for me.  :-)
So, the only solution is: right-click and select 'Save Target As'
0
 
LVL 4

Expert Comment

by:nutwiss
ID: 6201632
btw tim, your code works, but, it has to be said, shows little regard for windows standards - it's kind of rude to simply replace the system tray with your own window, don't you think? ;>>
0
 

Author Comment

by:samsonite_VB
ID: 6201889
Tim, your program is nice... but is there any way to get it NOT to take over the whole system tray?

It'd be awesome if It would just stick itself to the right of the last icon.

-Sam
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6201960
I am going to have a look at how this might be possible, either to do as you suggest or to place it in the taskbar as a seperate window.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7136219
Hi samsonite_VB,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Split points between: ameba and Richie_Simonetti

samsonite_VB, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7138131
I didn't try his links but, what about Tim?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7138956
hi Richie_Simonetti,
I have to base my original recommendation on available info.  And I have expert input re TimCottee's solution already (see the nutwiss post of 06/18/2001 02:54AM).

Tim, want to add anything?
-- Dan
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7138980
Ok. My apologize.
Cheers
(keep the hard work, Dan. Thank you)
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7140124
nutwiss is right in what he says and as I don't really need the 100 points I am quite happy to leave it as suggested. Dan has recommended at least 10 other threads my way this morning so I am quite happy with that.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7140323
My new EE handle: Santa Claus :)
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7181558
Per recommendation, force-accepted.

Netminder
CS Moderator

Richie_Simonetti: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20328617
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question