Solved

VB NET adding icons and text dynamically into status bar?

Posted on 2004-10-03
5
1,174 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
powerN  challenge 3 56
Controlled Assessment GCSE - desperate help needed 4 75
Help to convert powershell script into a gui 9 136
Base1 Encode/Decode 3 67
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
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…

911 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

24 Experts available now in Live!

Get 1:1 Help Now