Export (0) Print
Expand All
Expand Minimize

Frame Control for Visual Basic 6.0 Users 

The Visual Basic 6.0 Frame control is replaced by two controls in Visual Basic 2005: the GroupBox control and the Panel control.

Conceptual Differences

In Visual Basic 6.0, the Frame control is used as a container for grouping controls. In Visual Basic 2005, the Frame control is replaced by either the GroupBox control or the Panel control.

The GroupBox control is the equivalent of a Frame control with a BorderStyle property of 1 – Fixed Single. It has a visible border and optionally a caption.

The Panel control is the equivalent of a Frame control with a BorderStyle property of 0 – None. It has no border or caption.

In addition, there are numerous conceptual differences that apply to all controls, including differences in data binding, font handling, drag and drop, Help support and more. For more information, see Windows Forms Controls for Visual Basic 6.0 Users.

Frame Control Property, Method, and Event Equivalencies

The following tables list Visual Basic 6.0 properties, methods, and events, along with their Visual Basic 2005 equivalents. Those properties, methods, and events that have the same name and behavior are not listed. Where applicable, constants are indented beneath the property or method. All Visual Basic 2005 enumerations map to the System.Windows.Forms namespace unless otherwise noted.

Links are provided as necessary to topics explaining behavior differences. Where there is no direct equivalent in Visual Basic 2005, links are provided to topics that present alternatives

Frame Properties

Visual Basic 6.0 Visual Basic 2005 Equivalent

Appearance

FlatStyle (GroupBox control only)

BackColor

BackColor

NoteNote

Colors are handled differently in Visual Basic 2005. For more information, see Color Behavior for Visual Basic 6.0 Users.

BorderStyle

BorderStyle (GroupBox control only)

Caption

Text (GroupBox control only)

NoteNote

The Panel control does not have a Text property.

ClipControls

New implementation. For more information, see Graphics for Visual Basic 6.0 Users.

Container

Parent

DragIcon

DragMode

New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users.

Font

FontBold

FontItalic

FontName

FontSize

FontStrikethrough

FontUnderline

Font

NoteNote

Fonts are handled differently in Visual Basic 2005. For more information, see Font Object for Visual Basic 6.0 Users.

ForeColor

ForeColor

NoteNote

Colors are handled differently in Visual Basic 2005. For more information, see Color Behavior for Visual Basic 6.0 Users.

Height

Height, Size

NoteNote

Coordinates are handled differently in Visual Basic 2005. For more information, see Coordinate System for Visual Basic 6.0 Users.

HelpContextID

New implementation. For more information, see Help Support for Visual Basic 6.0 Users.

HWnd

Handle

Index

New implementation. For more information, see Control Arrays for Visual Basic 6.0 Users.

Left

Left

NoteNote

Coordinates are handled differently in Visual Basic 2005. For more information, see Coordinate System for Visual Basic 6.0 Users.

MouseIcon

New implementation. For more information, see Cannot set a custom MousePointer.

MousePointer

Cursor

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.

Parent

FindForm method

RightToLeft

RightToLeft

ToolTipText

ToolTip component

For more information, see ToolTip Support for Visual Basic 6.0 Users.

Top

Top

NoteNote

Coordinates are handled differently in Visual Basic 2005. For more information, see Coordinate System for Visual Basic 6.0 Users.

WhatsThisHelpID

New implementation. For more information, see Help Support for Visual Basic 6.0 Users.

Width

Width, Size

NoteNote

Coordinates are handled differently in Visual Basic 2005. For more information, see Coordinate System for Visual Basic 6.0 Users.

Frame Methods

Visual Basic 6.0 Visual Basic 2005 Equivalent

Drag

New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users.

Move

SetBounds

NoteNote

Coordinates are handled differently in Visual Basic 2005. 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

BringToFront or SendToBack function

Frame Events

Visual Basic 6.0 Visual Basic 2005 Equivalent

Click

Click (Panel only; GroupBox has no equivalent)

DblClick

DoubleClick (Panel only; GroupBox has no equivalent)

DragDrop

DragOver

OLECompleteDrag

OLEDragDrop

OLEDragOver

OLEGiveFeedback

OLESetData

OLEStartDrag

New implementation. For more information, see Drag and Drop for Visual Basic 6.0 Users.

Upgrade Notes

When a Visual Basic 6.0 application is upgraded to Visual Basic 2005, Frame controls that have their BorderStyle property set to 0 - None are upgraded to Panel controls; all other Frame controls are upgraded to GroupBox controls.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft