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

Display a control into the status bar

hello,

I currently develop an application which runs in background. I would like to
put at the place of the notifyicon, a label, which displays information about
this application.

Any Ideas?
Thanks.
Aug 23 '06 #1
6 1893
Hi,

Take a look at NotifyIcon class
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Franz" <Fr***@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
hello,

I currently develop an application which runs in background. I would like
to
put at the place of the notifyicon, a label, which displays information
about
this application.

Any Ideas?
Thanks.

Aug 23 '06 #2
Thanks, but I think the notifyIcon just can display icon?! I want to display
a label or textbox which contains informations about the application...
Aug 23 '06 #3
Well you can't without some pretty severe Win32 hacking... how often do you
see this, after all?

However, you could use GDI+ to draw the icon, either using a tiny font (and
abbreviations!), or by writing a scrolling marquee implementation... noddy
(colour changing) example follows, but I haven't tested it much : it might
leak like a sponge for all I know!

using System;
using System.Windows.Forms;
using System.Drawing;
class Program {
static Random rand = new Random();
static Icon GetIcon() {
using (Bitmap bmp = new Bitmap(32, 32)) {
using (Graphics g = Graphics.FromImage(bmp))
using (SolidBrush sb = new SolidBrush(Color.FromArgb(255,
rand.Next(255), rand.Next(255), rand.Next(255)))) {
g.FillEllipse(sb, 0, 0, 30, 30);
}
return Icon.FromHandle(bmp.GetHicon());
}
}
static void UpdateIcon(NotifyIcon ni) {
Icon old = ni.Icon;
ni.Icon = GetIcon();
if (old != null) old.Dispose();
}
static void Main() {
using (Form f = new Form())
using (Timer t = new Timer())
using (NotifyIcon ni = new NotifyIcon()) {
ni.Visible = true;
t.Interval = 1000;
t.Tick += delegate { UpdateIcon(ni); };
f.Load += delegate { t.Start(); };
f.FormClosing += delegate { t.Stop(); };
f.ShowDialog();
}
}
}
Aug 23 '06 #4
Hi,

Yes, it's only a icon you can show. AFAIK there is no way of doing what you
want with the framework's provided tools.
You can either use a third party control or find out to do it :) , I advise
you to look into the unmanaged world first. I have been around this NG a
couple of years and do not remember anybody with this issue before
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Franz" <Fr***@discussions.microsoft.comwrote in message
news:32**********************************@microsof t.com...
Thanks, but I think the notifyIcon just can display icon?! I want to
display
a label or textbox which contains informations about the application...

Aug 23 '06 #5
Thanks for the answers,
but it's not what I have need. I've found a exemple in C++ on the Web which
displays a progressbar in the taskbar.
I try to modify and put it into a DLL.
I hope it will process… ?!?
Aug 24 '06 #6
Hi,
"Franz" <Fr***@discussions.microsoft.comwrote in message
news:4F**********************************@microsof t.com...
Thanks for the answers,
but it's not what I have need. I've found a exemple in C++ on the Web
which
displays a progressbar in the taskbar.
I try to modify and put it into a DLL.
I hope it will process. ?!?
I do remember some programs like that, but I had never done it before.
IMO you will be much better if you find a third party control that
implements it. If you plan to do it on your own you will have to work hard
with win32 API

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Aug 24 '06 #7

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

Similar topics

6
by: Ragtimer | last post by:
I'm struggling my way through building an Access 2k application, learing how to do each step as I get to it .... in other words I'm pretty new at this ...... I'm running a series of processes...
1
by: Hasanain F. Esmail | last post by:
Hi All, I am using A2 for this database. I have a main form with bound fields of FlightNumber and FlightDate I also have a subform. This subform takes details of a passanger along with other...
4
by: Hardy Wang | last post by:
Hi I have a ListBox control in my ASP.NET page. After I binding data to this control, I would like to be able to change this display order of items in this control. Just like change layout...
0
by: Lasse Vågsæther Karlsen | last post by:
I was wondering if someone knew about a control for .NET that allows me to display log messages from an application while it is running. The following things are necessary: - word-wrap -...
11
by: Tina | last post by:
I'm in a button clicked event on mainpage.aspx. I want to display a new webpage that has just my image, which is a jpg. I want the page to be a ..jpg not an aspx so that it will be easy for the...
7
by: Oleg | last post by:
I have a web form let's say 'YYZ.aspx'. It has an iframe in it. When it loads it shows progress bar in IE this way: loading for page then again loading for page in iframe. This part is fine....
0
by: Brian Henry | last post by:
I thought this was useful, its a extender i just wrote for the new .NET menu strip and status strip to extend the menu items to add a status message so when a mouse rolls over the item it displays...
1
by: Benny Ng | last post by:
Dear All, Now I met one problem in the development of my one application. I have one ASP.NET page. It's for disply the information of customer. But now I have one new requirement. It's to...
9
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.