Comparison Between VB 6.0 and VB.NET Objects, Part 1

With this article, I want to provide a detailed explanation of the Form object’s Property Window changes (from Visual Basic 6.0 to Visual Basic.NET). This will be very useful when you come from a Visual Basic 6 background. This article is not just aimed at VB6 veterans but to anyone starting with Visual Basic.NET—as you will see.

First off, start with the Visual Basic 6.0 Form property descriptions and settings.

Visual Basic 6 Properties Descriptions and their Settings

Have you ever wondered what all these properties do? I have found myself seeing a Form property in the Properties Window, and realising—I haven’t used it before, or I don’t know what exactly that particular Property does. So, what I’ve done was to compile this list of Visual Basic 6.0 Form object Properties along with Descriptions and Settings, which will be a handy reference to anyone using Visual Basic 6.

Property Name Property Description Property Setting
Appearance Returns/Sets whether or not an object is painted at run time with 3-D effects
  • 0 – Flat
  • 1 – 3D
AutoRedraw Returns the output from a graphics method to a persistent bitmap
  • True
  • False
BackColor Background color used to display text and graphics in an object

Choose any color from the appropriate tab in the Color dialog box

BorderStyle The Border style for an object Select any of the following:

  • 0 – None
  • 1 – Fixed Single
  • 2 – Sizable
  • 3 – Fixed Dialog
  • 4 – Fixed ToolWindow
  • 5 – Sizable ToolWindow
Caption Sets the text displayed in a window’s title bar Textual data can be entered here
ClipControls Determines whether graphics methods in Paint events repaint an entire object
  • True
  • False
ControlBox Determines whether the Control’s Menu Box is shown on the left side of the title bar
  • True
  • False
DrawMode Sets the appearance of output from graphics methods or of a Shape or a Line control Select any of the following:

  • 1 – Blackness
  • 2 – Not Merge Pen
  • 3 – Mask Not Pen
  • 4 – Not Copy Pen
  • 5 – Mask Pen Not
  • 6 – Invert
  • 7 – Xor Pen
  • 8 – Not Mask Pen
  • 9 – Mask Pen
  • 10 – Not Xor Pen
  • 11 – Nop
  • 12 – Merge Not Pen
  • 13 – Copy Pen
  • 14 – Merge Pen Not
  • 15 – Merge Pen
  • 16 – Whiteness
DrawStyle Determines the Line Style for output from graphics methods Select any of the following:

  • 0 – Solid
  • 1 – Dash
  • 2 – Dot
  • 3 – Dash-Dot
  • 4 – Dash-Dot-Dot
  • 5 – Transparent
  • 6 – Inside Solid
DrawWidth Line width for output from graphics methods Integer values ONLY
Enabled Determines whether a control can respond to user-generated events
  • True
  • False
FillColor Color used to fill in shapes, circles, and boxes

Choose any color from the appropriate tab in the Color dialog box

FillStyle Fill style of a shape Select any of the following:

  • 0 – Solid
  • 1 – Transparent
  • 2 – Horizontal Line
  • 3 – Vertical Line
  • 4 – Upward Diagonal
  • 5 – Downward Diagonal
  • 6 – Cross
  • 7 – Diagonal Cross
Font Returns a Font object

Choose desired Font from the displayed Dialogbox

ForeColor Forecolor used to display text and graphics in an object

Choose any color from the appropriate tab in the Color dialog box

HasDC Determines whether a unique display context is allocated for the control
  • True
  • False
Height Height of an object Integer Values ONLY
HelpContextID Specifies the default help file context ID of an object Integer values ONLY; for example: 0
Icon Icon displayed when a form is minimized at run time

Browse for desired Icon

KeyPreview Determines whether keyboard events for an object are invoked before keyboard events for controls on that object
  • True
  • False
Left Distance between the internal left edge of an object and the left edge of its container Integer values ONLY
LinkMode Type of link used for a DDE conversation and activates the connection
  • 0 – None
  • 1 – Manual
LinkTopic Source application and topic for a destination control Textual data
MaxButton Determines whether a form has a Maximize button
  • True
  • False
MDIChild Determines whether a form is displayed inside a MDI Parent form
  • True
  • False
MinButton Determines whether a form has a Minimize button
  • True
  • False
MouseIcon Sets a custom mouse icon

Browse for desired Icon

MousePointer Type of mouse pointer displayed when over part of an object Select any of the following:

  • 0 – Default
  • 1 – Arrow
  • 2 – Cross
  • 3 – I – Beam
  • 4 – Icon
  • 5 – Size
  • 6 – Size NE SW
  • 7 – Size N S
  • 8 – Size NW SE
  • 9 – Size W E
  • 10 – Up Arrow
  • 11 – Hourglass
  • 12 – No Drop
  • 13 – Arrow and Hourglass
  • 14 – Arrow and Question
  • 15 – Size All
  • 99 – Custom
Moveable Determines whether a form can be moved
  • True
  • False
Name Name of the form Textual data
NegotiateMenus Determines whether a form incorporates the menus from an object on the form’s menu bar
  • True
  • False
OLEDropMode Determines whether this object can act as an OLE object
  • 0 – None
  • 1 – Manual
Palette Image that contains the palette to use on an object when PaletteMode is set to Custom

Browse for desired Palette

PaletteMode Value that determines which palette to use for controls on an object Select any of the following:

  • 0 – Halftone
  • 1 – UseZOrder
  • 2 – Custom
Picture Graphic to be displayed on the control

Browse for Picture to use on Form’s Background

RightToLeft Text display direction and control visual appearance on a bidirectional system
  • True
  • False
ScaleHeight The number of units for the vertical measurement of a object’s interior Any Numeric value
ScaleLeft Horizontal coordinates for the left edges of an object Any Numeric value
ScaleMode Value indicating measurement units for object coordinates when using graphics methods or positioning controls Select any of the following:

  • 0 – User
  • 1 – Twip
  • 2 – Point
  • 3 – Pixel
  • 4 – Character
  • 5 – Inch
  • 6 – Millimetre
  • 7 – Centimetre
ScaleTop Vertical coordinates for the top edges of an object Any Numeric value
ScaleWidth Number of units for the Horizontal measurement of an object’s interior Any Numeric value
ShowInTaskbar Determines whether a form or MDIForm appears in the Windows taskbar.
  • True
  • False
StartUpPosition Value specifying the position of a form when it first appears Select any of the following:

  • 0 – Manual
  • 1 – CenterOwner
  • 2 – CenterScreen
  • 3 – Windows Default
Tag Stores any extra data needed for your program Any Textual and Numeric data
Top Distance between the internal top edge of an object and the top edge of its container Integer Values ONLY
Visible Determines whether the object is visible or hidden
  • True
  • False
WhatsThisButton Determines whether the What’s This Button appears in the title bar of a form or MDI form
  • True
  • False
WhatsThisHelp Context-sensitive help uses the What’s This popup provided by Windows Help
  • True
  • False
Width Width of an object Integer Values ONLY
WindowState Visual state of a form at run time Select any of the following:

  • 0 – Normal
  • 1 – Minimized
  • 2 – Maximized

More by Author

Must Read