See Also4O57H7              PropertiesKRQHQX           Events41VHYZC           Methods2MD8IVC


A form is a window or dialog box1OENUBI that makes up part of an application's141RJVK 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 methods1XB6QBF to manipulate forms from code.  For example, you can use the Move103G76J method to change a form's location and size.

A special kind of form, the MDI form1ILMZQ7, can contain other forms called MDI childEXWLAX forms.  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 MDIChildBJG7BM property to True.

You can create multiple instancesCN50HF of forms in code by using the NewLANNEW reserved word in DimLANDIM, GlobalTDN897, SetLANSET, and StaticCC4JTI statements.

When designing forms, set the BorderStyle43RNRL property to define a form's border and set the CaptionF6ZZXB property to put text in the title bar32N908X.  In code, you can use the HideGU6180 and Show2IF9Z3Q methods to make forms invisible or visible at run timeCYRM35.


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 serverNZH554 links in a DDEDEFDDE conversation, with a label3MU760W, picture box3W9LV25, or text box2GYGEC control furnishing the data.


ActiveControlJCXG6P          FontBold5NZYQSD                 LinkTopicEVWV3S

ActiveFormGCUI9X             FontItalic5NZYQSD                MaxButton117DCC7

AutoRedraw1UY7ZM3            FontNameB3RMO3               MDIChildBJG7BM

BackColor1W9T6JQ              FontSizeB3WV13                 MinButton1B9HLHD

BorderStyle43RNRL            FontStrikethru5NZYQSD         MousePointer1VSV6UM

CaptionF6ZZXB                   FontTransparent5NZYQSD     Name2016V9P

ClipControls2102ZSX            FontUnderline5NZYQSD         Picture4GBE5Q

ControlBox35ZQLA             ForeColor1W9T6JQ               ScaleHeight3J8U7ZN

CountVN7VUP                     hDCZVPW3G                       ScaleLeft138Z3ME

CurrentX9TOITD                 HeightL14VJZ                    ScaleMode5SNY0BP

CurrentY9TOITD                 HelpContextID764PDR        ScaleTop138Z3ME

DrawMode2ZATBSD              hWnd1CIW7KQ                     ScaleWidth3J8U7ZN

DrawStyle4PNS0NQ               Icon2S1DMPP                        Tag6GI6KP

DrawWidthMEUSKJ              Image6AEZWAR                     Top1CIZPD6

Enabled3XD4FN                  KeyPreview18F9O8A            Visible32KNZA4

FillColorL2TW7M                  Left1CIZPD6                        WidthL14VJZ

FillStyle2N3S7OE                  LinkModeM1RK6S                WindowStateI5APPB




Activate2E06TW                  KeyPressPFFDUA               MouseDownD0VNMJ

Click68UQAKP                      KeyUpRI06O6                    MouseMove1D70SW5

DblClick2UG5QK1                 LinkClose17O5TU0               MouseUpD0VNMJ

Deactivate2E06TW              LinkErrorEGZX07                Paint25UTDKO

DragDrop1EBOJGL               LinkExecute1OO8NGN            QueryUnload0HC58S7

DragOver2TUGMAC               LinkOpenM1TL81                Resize2WM7WLP

GotFocus32EWUCC               Load2S1GYBF                       UnloadY083CJ

KeyDownRI06O6                LostFocus2ZXQDAR




Circle38E9WK                     PrintForm1EMMGHM             Show2IF9Z3Q

ClsLANCLS                         Print9V51E5                      TextHeight4OFKMKO

HideGU6180                       PSet103J0PY                      TextWidth8ZWV014

LineGU01B0                       Refresh3SMNZGP                 ZOrder1YQ29TM

Move103G76J                      SetFocus4AVBOY

Point3QAMBS                      ScaleQ2ADWT



See Also



Forms Collection1MV9U5Q




Programmer's Guide:

Chapter 2, "Your First Visual Basic Application"

Chapter 5 , "Managing Projects"

Chapter 14, "Multiple-Document Interface (MDI) Applications"