Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

How to Show Icons in the Status Bar

Author: DevASP
Download Source Code : 426_StatusBar.zip

This article is about how you can show icons in the status bar in vb.net. First of all what is a status bar? Status Bars are used to display status messages at the bottom of the form.

  • Steps you will do. 
  • Start visual studio and create a new window application. 
  • Drop an instance of status bar from your toolbox. 
  • Open your code window and write the following code in the load event of form. This code will add panels to the status bar, declare an object of type icon which will hold the icons to display in the panel of status bar and finally assign that icon to the panel of status bar. Note that the path of the icon in correct.

StatusBar1.ShowPanels = True

Me.StatusBar1.TabIndex = 0

Me.StatusBar1.Text = "How to show icons in the status bar panel"

Dim pnl1 As New StatusBarPanel

Dim pnl2 As New StatusBarPanel

pnl1.Text = "How to show icons in the status bar panel"

pnl1.Width = 32

pnl1.AutoSize = StatusBarPanelAutoSize.Spring

Dim icon As New Icon("../setup.ico")

pnl1.Icon = icon

pnl2.Text = DateTime.Now.ToString()

StatusBar1.Panels.AddRange(New StatusBarPanel() {pnl1, pnl2})

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Using Mouse Events To Make Glow Controls

Disclaimer - Privacy
© 2002-2017 DevASP.net