Microsoft Forms 20 Object Library Vb6
Useful for numeric increments without a separate textbox.
Private Sub SpinButton1_SpinUp()
TextBox1.Text = Val(TextBox1.Text) + 1
End Sub
Private Sub SpinButton1_SpinDown()
TextBox1.Text = Val(TextBox1.Text) - 1
End Sub
One of the most useful controls is the MultiPage. Unlike the standard VB6 SSTab (which requires a separate control license), MultiPage is clean, stable, and easy to use.
Here’s a simple code snippet to add pages dynamically at runtime:
' Assume you have "Microsoft Forms 2.0 Object Library" referenced
' and a control named "MultiPage1" on your form.
Private Sub Form_Load()
' Add a new page
MultiPage1.Pages.Add "Page2", "Settings", 1 microsoft forms 20 object library vb6
' Add a checkbox to the new page
Dim chk As MSForms.CheckBox
Set chk = MultiPage1.Pages("Page2").Controls.Add("MSForms.CheckBox.1", "chkEnableLogging", True)
chk.Caption = "Enable Logging"
chk.Left = 10
chk.Top = 10
End Sub
The event model is slightly different from native VB6 controls, but it’s intuitive. For instance, MultiPage fires a Change event when you switch tabs.
Cause: The Microsoft Forms 2.0 library is not a redistributable part of VB6 runtime.
Solution:
Check the checkbox next to it, then click OK.
The toolbox will now show new icons: MultiPage, TabStrip, Image, etc.
Note: If you do not see "Microsoft Forms 2.0 Object Library," your system may lack FM20.DLL. This file is usually present in C:\Windows\System32\ on Windows XP/7/10 (32-bit) or C:\Windows\SysWOW64\ on 64-bit Windows. Register it using regsvr32 fm20.dll if necessary. Useful for numeric increments without a separate textbox
The library is officially version 2.0, but developers often search for "Forms 20" (dropping the decimal) or "Microsoft Forms 2.0". The file version of FM20.dll can vary (e.g., 2.0.1.3, 2.0.5.3), but the object model remains consistent. When you see "Microsoft Forms 2.0 Object Library" in your VB6 References dialog, that is the correct entry.
Cause: The FM20.dll is missing, unregistered, or blocked by Windows.
Solution:
The Microsoft Forms 2.0 Object Library (FM20.dll) provides form controls that can be used outside of Microsoft Office applications, directly in VB6 applications. These controls offer more advanced features than standard VB6 controls.
Let’s build a small example.
Form Layout:
Code:
Private Sub Form_Initialize()
With lstEmployees
.ColumnCount = 3
.ColumnWidths = "40;150;120"
.AddItem "101;Alice Johnson;HR"
.AddItem "102;Bob Smith;IT"
.AddItem "103;Carol Davis;Finance"
End With
End Sub
Private Sub cmdAdd_Click()
Dim nextID As Integer
nextID = lstEmployees.ListCount + 101
Dim newRow As String
newRow = CStr(nextID) & ";" & txtName.Text & ";" & cboDept.Text
lstEmployees.AddItem newRow
txtName.Text = ""
cboDept.Text = ""
End Sub
Private Sub lstEmployees_Click()
' Display selected name
MsgBox "You selected: " & lstEmployees.Column(1, lstEmployees.ListIndex)
End Sub
Microsoft Forms 20 Object Library Vb6
Useful for numeric increments without a separate textbox.
One of the most useful controls is the
MultiPage. Unlike the standard VB6SSTab(which requires a separate control license),MultiPageis clean, stable, and easy to use.Here’s a simple code snippet to add pages dynamically at runtime:
The event model is slightly different from native VB6 controls, but it’s intuitive. For instance,
MultiPagefires aChangeevent when you switch tabs.Cause: The Microsoft Forms 2.0 library is not a redistributable part of VB6 runtime. Solution:
The library is officially version 2.0, but developers often search for "Forms 20" (dropping the decimal) or "Microsoft Forms 2.0". The file version of FM20.dll can vary (e.g., 2.0.1.3, 2.0.5.3), but the object model remains consistent. When you see "Microsoft Forms 2.0 Object Library" in your VB6 References dialog, that is the correct entry.
Cause: The FM20.dll is missing, unregistered, or blocked by Windows. Solution:
The Microsoft Forms 2.0 Object Library (FM20.dll) provides form controls that can be used outside of Microsoft Office applications, directly in VB6 applications. These controls offer more advanced features than standard VB6 controls.
Let’s build a small example.
Form Layout:
Code: