Solved

VB NET adding icons and text dynamically into status bar?

Posted on 2004-10-03
5
1,177 Views
Last Modified: 2010-05-18
1 - How can i add icons and text dynamically into status bar of my form in VB NET?
2 - I am adding picture in picture boxes but the files are external to my projet. How can i add these files in my projects resources?

I need a fast reply...... 400 points ;)
0
Comment
Question by:ascendit
  • 2
5 Comments
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12214725
I hope you have Added a Panel to the Status Bar (if not Add using Panels collection in the Property Window)

Then to Add Text
SBar.Panels(0).Text = "Text in the Status Bar"

Now Adding an Icon is a bit of work, And for using a Resource file just for Icons, I prefer ImageList, So add an Imagelist and add the icons into it then

SBar.Panels(0).Icon = Icon.FromHandle((New Bitmap(ImageList1.Images(0)).GetHicon))

See the SBar.Panels(0).Icon property takes an Icon to show on the StatusBar bar How to get an Icon, for this you need to use Icon.FromHandle method, Now for getting a Handle to the Icon you need to convert the Icon to BitMap... So all the code you see

I have cramped all the code in one line you could break it though say like creating a Bitmap object separately so on..
0
 

Author Comment

by:ascendit
ID: 12220925
Sorry but this pannel thing is not working. When i add panel from the collection window they appear in that but dont appear at all in the status neither do they appear at runtime, but the error is not thrown 2. So the panels object is present but cant be displayed. Now aht shuld i do :P
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 400 total points
ID: 12223821
You have to set the property of the statusbar called ShowPanels=True
then only the Panels will be visible

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about problems I had with the new location API and permissions in Marshmallow
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

803 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