Solved

VB NET adding icons and text dynamically into status bar?

Posted on 2004-10-03
5
1,169 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
Comment Utility
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
Comment Utility
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
Comment Utility
You have to set the property of the statusbar called ShowPanels=True
then only the Panels will be visible

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now