See Also Properties Events Methods
A form is a window or dialog box that makes up part of an application's interface.
Forms have properties that determine aspects of their appearance, such as position, size, and color, and aspects of their behavior, such as whether they are resizable.
Forms can also respond to events initiated by the user or triggered by the system. For example, you could write code in a form's Click event procedure that would allow the user to change the color of a form by clicking it.
In addition to properties and events, you can use methods For example, you can use the Move method to change a form's location and size. to manipulate forms from code.
A special kind of form, the MDI form An MDI form is created with the New MDI Form command on the File menu; an MDI child form is created by choosing New Form from the File menu and then setting the MDIChild property to True., can contain other forms called MDI child forms.
You can create multiple instances of forms in code by using the New reserved word in Dim , Global , Set , and Static statements.
When designing forms, set the BorderStyle In code, you can use the Hide and Show methods to make forms invisible or visible at run time . property to define a form's border and set the Caption property to put text in the title bar .
Note You cannot use Hide on an MDI child form.
Setting BorderStyle to 0 removes the border. If you want your form to have a border without the title bar, Control-box menu, Maximize button, and Minimize button, you can do so by deleting any text from the form's Caption property and setting the form's ControlBox, MaxButton, and MinButton properties to False.
Form is an object type. You can declare variables as type Form before setting them to an instance of a type of form that was declared at design time. Similarly, you can declare a parameter to a procedure as type Form.
Forms also can be server links in a DDE conversation, with a label , picture box , or text box control furnishing the data.
ActiveControl FontBold LinkTopic
ActiveFormGCUI9X FontItalic MaxButton
AutoRedraw1UY7ZM3 FontName MDIChild
BackColor1W9T6JQ FontSize MinButton
BorderStyle FontStrikethru MousePointer
Caption FontTransparent Name
ClipControls FontUnderline Picture
ControlBox35ZQLA ForeColor ScaleHeight
Count hDC ScaleLeft
CurrentX Height ScaleMode
CurrentY HelpContextID ScaleTop
DrawMode hWnd ScaleWidth
DrawStyle4PNS0NQ Icon Tag
DrawWidthMEUSKJ Image Top
Enabled KeyPreview Visible
FillColorL2TW7M Left Width
FillStyle2N3S7OE LinkMode WindowState
Activate KeyPress MouseDown
Click KeyUp MouseMove
DblClick LinkClose MouseUp
Deactivate2E06TW LinkError Paint
DragDrop LinkExecute QueryUnload
DragOver LinkOpen Resize
GotFocus Load Unload
Circle PrintForm Show
ClsLANCLS Print TextHeight4OFKMKO
Hide PSet TextWidth
Line Refresh ZOrder
Chapter 2, "Your First Visual Basic Application"
Chapter 5 , "Managing Projects"
Chapter 14, "Multiple-Document Interface (MDI) Applications"