Microsoft Forms 20 Object Library Vb6 -
This library is often used in VB6 to get access to "Forms 2.0" controls (like the ones in Microsoft Office) which support features the standard VB6 controls don't, like transparency support.microsoft.com 1. How to Add the Library to Your Project To use these controls in your VB6 IDE, follow these steps: menu and select
For decades, Visual Basic 6.0 (VB6) has remained a reliable, rapid application development tool for Windows-based software. While modern development has shifted toward .NET, legacy systems still thrive. A key component for enhancing user interfaces (UI) in VB6 is the .
With Controls.Add("Forms.CheckBox.1", "chkActive") .Left = 120 .Top = 48 End With
Private Sub Form_Load() With ComboBox1 .Clear .ColumnCount = 3 .ColumnWidths = "50 pt;100 pt;80 pt" .ListWidth = "230 pt" ' Add rows using the List array property .AddItem "C001" .List(0, 1) = "John Doe" .List(0, 2) = "Premium" .AddItem "C002" .List(1, 1) = "Jane Smith" .List(1, 2) = "Standard" .AddItem "C003" .List(2, 1) = "Bob Johnson" .List(2, 2) = "Enterprise" End With End Sub Private Sub ComboBox1_Change() ' Capture the value of the second column (Name) on selection If ComboBox1.ListIndex <> -1 Then MsgBox "Selected Customer: " & ComboBox1.List(ComboBox1.ListIndex, 1) End If End Sub Use code with caution. Example 2: Implementing Unicode Text Display
: Your users must have a licensed copy of Microsoft Office. FM20.dll is not redistributable without an Office license. If your app runs on a server (e.g., a Windows Service), you cannot rely on this library. microsoft forms 20 object library vb6
Example 1: Populating a Forms 2.0 ComboBox with Multiple Columns
If the goal is business forms or surveys, ignore desktop controls entirely and utilize cloud solutions like Microsoft Forms (online) or Power Apps.
: This Reference PDF provides a comprehensive overview of the object model, including bidirectional text properties (right-to-left support) used in Office 2000 and later.
| Error Message | Possible Cause(s) | Solution(s) | | :--- | :--- | :--- | | "Error 7 - Out of Memory" | The application is being run on a machine without Office installed. Microsoft has flagged the use of FM20.DLL as problematic. | This is the classic distribution problem. The best solution is to ensure Microsoft Office is installed on the target machine or to remove the library from the project. | | "Component 'FM20.dll' or one of its dependencies not correctly registered" | The file is missing, unregistered, or the registry entry is corrupted. | Re-register the DLL. Open a command prompt as an administrator and navigate to the folder containing FM20.dll (usually C:\Windows\SysWOW64 for 64-bit systems). Type regsvr32 FM20.dll and press Enter. | | The controls appear on the form but do not function (click events fire, but no visible change). | The MSForms controls are windowless, meaning they do not have a standard window handle (hwnd). This can cause rendering issues in some scenarios. | This is a known limitation of the library. Consider if a different control or a more robust method is needed. | This library is often used in VB6 to get access to "Forms 2
Standard VB6 Label and Image controls simulate transparency but often fail over complex backgrounds. MSForms controls support actual alpha-channel behavior via the BackStyle property. Enhanced Styling
If you are migrating functionality from Excel or Word VBA to a standalone VB6 executable, these controls make the transition seamless. Key Limitations and Warnings (Important)
To use the Microsoft Forms 2.0 Object Library in your VB6 project:
Private Sub CommandButton1_Click() Dim lNewColor As Long lNewColor = RGB(12, 12, 12) Dim mscontrol As MSForms.Control Dim mstextbox As MSForms.TextBox A key component for enhancing user interfaces (UI)
This library is not just about simple buttons and text boxes; it includes a comprehensive object model with its own collections, properties, methods, and events that allow for sophisticated UI manipulation.
Microsoft Forms 2.0 Object Library (also known as FM20.dll) is a legacy library used in Visual Basic 6 (VB6) for creating graphical user interfaces (GUIs) and forms. Here's some content related to it:
Once the reference is added, you can instantiate Forms 2.0 controls directly in your code. Here is a basic example of creating a TextBox and setting its properties:
