Jalaj P. Jha

Technical & Miscellaneous Ramblings

The FRM File Specification

without comments

The .FRM file used in Visual Basic is saved as an ASCII text file containing the details of all the controls that are placed on the form, and the Menu details if any on the form, and of course the Basic code that you can see in the Code section.

The FRM file starts with version information of the file as :

VERSION 5.00

Next section describes all the controls other than the default one. The description containing the Class ID of the control,version and the filename looks similar to :

Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"

The next section describes the form and the controls contained therein. Each control is described as :

Begin <Control> <Control Name>
    <Property> = <Value>
    ...
    ...
    Begin <Child Control> <Child Control Name>
        <Property> = <Value>
        ...
        ...
    End
End

All controls are nested within the parent control. The VB.Form i.e. the form that we are talking of, is the outermost control and all controls, unless it is located within a Frame or is a submenu item on the Menu bar, is nested as a child of the Form control. The controls occuring within Frames and the submenu items under Top Menu Items are nested within there respective parent controls and so on.

The next section is the form attributes and is normally

Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Reference : MSDN

Written by Jalaj

January 16th, 2007 at 8:11 am

Posted in File Formats, Visual Basic

Tagged with

Leave a Reply