StatusBar Control for Visual Basic 6.0 Users
The StatusBar control in Visual Basic 6.0 is replaced by the Windows Forms StatusStrip control in Visual Basic 2008. The names of some properties, methods, events, and constants are different, and in some cases there are differences in behavior.
Conceptual Differences
The Visual Basic 6.0 StatusBar control contains a collection of Panel objects, each of which can display text and images.
The Visual Basic 2008, StatusStrip control is more similar to the ToolStrip control. In addition to panels (now known as ToolStripStatusLabel controls), StatusStrip controls can contain progress bars, drop down menus, and split buttons. There is also a Windows Forms StatusBar control, but it is recommended that you use StatusStrip instead.
SimpleText Property
In Visual Basic 6.0, the SimpleText property of a StatusBar control defines the text that is displayed when the Style property is set to sbrSimple.
The Visual Basic 2008 StatusStrip control does not support a simple style, and there is no longer a SimpleText property.
Style Property
In Visual Basic 6.0, the Style property determines whether a StatusBar control shows multiple panels (sbrNormal) or just one large panel (sbrSimple). When set to the simple style, the bevel style is raised with no borders.
In Visual Basic 2008, the Style property no longer exists; to emulate the simple style you can add a single ToolStripStatusLabel object to the StatusStrip control and set its BorderStyle property.
StatusBar Control Property, Method, and Event Equivalencies
The following tables list Visual Basic 6.0 properties, methods, and events, along with their Visual Basic 2008 equivalents. Properties, methods, and events with the same names and behaviors are not listed. All Visual Basic 2008 enumerations map to the System.Windows.Forms namespace unless otherwise noted.
Links are provided as necessary to topics explaining differences in behavior. Where there is no direct equivalent in Visual Basic 2008, links are provided to topics that present alternatives.
Properties
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
Align |
|
Container |
|
DragIcon DragMode |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
Font FontBold FontItalic FontName FontSize FontStrikethrough FontUnderline |
![]()
Fonts are handled differently in Visual Basic 2008. For more information, see Font Object for Visual Basic 6.0 Users.
|
Height |
![]()
Coordinates are handled differently in Visual Basic 2008. For more information, see Coordinate System for Visual Basic 6.0 Users.
|
HWnd |
Handle |
Index |
New implementation. For more information, see Control Arrays for Visual Basic 6.0 Users. |
MouseIcon |
New implementation. For more information, see Cannot set a custom MousePointer. |
MousePointer |
For a list of constants, see MousePointer for Visual Basic 6.0 Users. |
OLEDropMode |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
Panels |
|
Parent |
|
ShowTips |
ToolTip component. For more information, see ToolTip Support for Visual Basic 6.0 Users. |
SimpleText |
New implementation. |
Style |
New implementation. |
ToolTipText |
ToolTip component. For more information, see ToolTip Support for Visual Basic 6.0 Users. |
WhatsThisHelpID |
New implementation. For more information, see Help Support for Visual Basic 6.0 Users. |
Methods
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
Drag |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
Move |
![]()
Coordinates are handled differently in Visual Basic 2008. For more information, see Coordinate System for Visual Basic 6.0 Users.
|
OLEDrag |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
ShowWhatsThis |
New implementation. For more information, see Help Support for Visual Basic 6.0 Users. |
ZOrder: 0 – vbBringToFront 1 - vbSendToBack |
BringToFront or SendToBack function |
Events
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
DblClick |
|
DragDrop DragOver |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
OLECompleteDrag OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData OLEStartDrag |
New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users. |
PanelClick |
|
PanelDblClick |
Upgrade Notes
When a Visual Basic 6.0 project is upgraded to Visual Basic 2008, any StatusBar controls are upgraded to Windows Forms StatusBar controls. Where properties, methods, and events have no equivalent or have differences in behavior, upgrade notes or warnings are added to your code.