Microsoft Forms 20 Object Library Vb6 Jun 2026
It sounds like you're working with some classic VB6 (Visual Basic 6.0) and looking to use the Microsoft Forms 2.0 Object Library
The is an external library (stored in FM20.DLL ) used in Visual Basic 6 (VB6) primarily to provide enhanced user interface controls. While VB6 has its own native controls, this library is often used because it supports Unicode (UTF-16) and provides specific features like transparent backgrounds that standard VB6 controls lack. 🛠️ How to Add it to Your VB6 Project
This example shows how to both design-time and runtime-manipulate MSForms controls inside your VB6 project.
Microsoft's official solution is clear: . If you must use the library, the only supported way to deploy your application is to restrict it to target machines that already have a licensed copy of Microsoft Office 97 or later installed. You would then need to document Microsoft Office as a prerequisite for your software. microsoft forms 20 object library vb6
Add the following code:
Private Sub Form_Load() ' Rename the MultiPage tabs MultiPage1.Pages(0).Caption = "General" MultiPage1.Pages(1).Caption = "Advanced" ' Add a Forms 2.0 TextBox to the General tab dynamically Dim txtName As MSForms.TextBox Set txtName = MultiPage1.Pages(0).Controls.Add("Forms.TextBox.1", "txtUserName", True) txtName.Left = 10 txtName.Top = 10 txtName.Width = 150 txtName.Text = "Enter your name"
Unlike intrinsic VB6 controls (such as VB.TextBox or VB.Label ) which are bound tightly to standard ANSI Windows controls, the Microsoft Forms 2.0 library provides a set of modern, unbound controls. When referenced, it exposes a variety of UI elements, including: It sounds like you're working with some classic
: Allows simultaneous text and image rendering.
In the Components dialog window, scroll down the list until you find . Check the box next to it. Click Apply , then click OK .
Private Sub CommandButton1_Click() Dim lNewColor As Long lNewColor = RGB(12, 12, 12) Dim mscontrol As MSForms.Control Dim mstextbox As MSForms.TextBox Microsoft's official solution is clear:
Click on in the top menu bar, then select Components... (or press Ctrl + T ).
Here's an example of creating a simple form with a button and text box using the Microsoft Forms 2.0 Object Library:
