Microsoft Forms 20 Object Library Vb6 May 2026

Mastering the Microsoft Forms 2.0 Object Library in VB6: A Complete Guide

MultiPage Control Example

Private Sub Form_Load()
    ' Add pages to MultiPage control
    MultiPage1.Pages.Add "Page 3", "Additional Tab"
' Add controls to specific page
Dim txt As MSForms.TextBox
Set txt = MultiPage1.Pages(0).Controls.Add("Forms.TextBox.1")
txt.Left = 10
txt.Top = 10
txt.Width = 150

End Sub

Private Sub MultiPage1_Change() Caption = "Current Tab: " & MultiPage1.Pages(MultiPage1.Value).Caption End Sub

Conclusion

The Microsoft Forms 2.0 Object Library offers VB6 developers a gateway to more modern, flexible form controls without leaving the classic VB6 environment. While it comes with deployment caveats and occasional IDE quirks, its MultiPage control alone makes it worth learning.

By understanding how to reference the library, add its controls, troubleshoot common errors like missing FM20.dll, and follow best practices, you can dramatically improve the user experience of your legacy VB6 applications.

If you have been frustrated with the limited UI capabilities of VB6’s native toolbox, give the Microsoft Forms 2.0 library a try. Just remember: with great power comes great responsibility—and a few extra deployment checks.


Have questions about a specific error with the “Microsoft Forms 20 Object Library VB6”? Leave a comment below or consult Microsoft’s official documentation for FM20.dll.

In Visual Basic 6.0 (VB6), the Microsoft Forms 2.0 Object Library (FM20.DLL) is primarily used for its set of lightweight ActiveX controls (like text boxes and combo boxes) and for handling clipboard data via the DataObject.

However, this library is not the standard tool for creating reports in VB6. For reporting, you should use the built-in Data Report designer or the Data Environment. How to Create a Report in VB6 (The Standard Way)

Instead of using the Forms 2.0 library, follow these steps to use the native Data Report Designer: Add a Data Environment: Go to the Project menu and select Add Data Environment.

Set up a connection to your database and create a "Command" (query) to pull the data you want in your report. Add a Data Report: Go to Project -> Add Data Report.

If you don't see it, go to Project -> Components, click the Designers tab, and check Data Report. Design the Layout:

Set the Data Report's DataSource property to your DataEnvironment1 and the DataMember to your specific command.

Drag and drop fields from your Data Environment onto the Detail section of the report. Display the Report:

Use the command DataReport1.Show in your code to preview or print the report. Why use Microsoft Forms 2.0?

Developers usually only reference the Microsoft Forms 2.0 Object Library in VB6 projects for two specific reasons:

Unicode Support: Its controls (like text boxes) support Unicode, whereas standard VB6 controls often do not.

Clipboard Operations: Accessing the MSForms.DataObject for advanced copy-paste functions.

Note: Microsoft does not recommend redistributing FM20.DLL with your applications because it is part of Microsoft Office. Users must have Office installed for it to work reliably.

Thread: vb6 unicode control by Microsoft Forms 2.0 Object Library

Microsoft Forms 2.0 Object Library (contained in ) is a legacy library used to add enhanced GUI controls—such as Unicode-compatible text boxes—to Visual Basic 6.0 and VBA projects.

While it is standard for Microsoft Office, using it in standalone VB6 applications is generally discouraged because it is not redistributable and can cause licensing errors on machines without Office installed. Key Controls and Features

This library provides a set of controls often preferred over standard VB6 "intrinsic" controls because they support

characters (e.g., Greek, Japanese). Common controls include: CodeGuru Forums : TextBox, ComboBox, CheckBox, OptionButton, ToggleButton. : Frame, MultiPage, TabStrip. Interactive : CommandButton, ScrollBar, SpinButton, Image, Label. Clipboard Support : It is also used to handle the DataObject for clipboard operations. Stack Overflow How to Add it to VB6 Can't find Microsoft Forms 2.0 Object Library or FM20.DLL

Final Thoughts

The Microsoft Forms 2.0 Object Library is a hidden gem for the VB6 developer who knows exactly where to use it. It won’t save your legacy project from eventual migration to .NET, but it might just make that final maintenance release a lot more pleasant.

Treat it like a specialty tool—reach for it when you need tabbed interfaces or spinners, but don’t build your entire foundation on it.

Have you used FM20.dll in a VB6 project? Share your war stories or success tips in the comments below!

The "Microsoft Forms 2.0 Object Library" (often referred to as

) is a library primarily used in VB6 to provide Unicode-compliant controls and the DataObject

for clipboard operations. It was originally designed for VBA userforms in Microsoft Office applications. Key Reference Information Library Name: Microsoft Forms 2.0 Object Library DLL Filename: Typical Location: C:\Windows\System32\FM20.DLL on 64-bit systems) Primary Namespace: Stack Overflow Major Classes and Objects

This library provides a specific set of controls that differ from the standard VB6 intrinsic controls. Commonly used objects include: Microsoft Learn MSForms.DataObject : Used for programmatic access to the system clipboard. MSForms.TextBox microsoft forms 20 object library vb6

: A text box that supports Unicode and multi-line properties. MSForms.CommandButton : Standard clickable button. MSForms.Label : Display text. MSForms.ListBox : List and dropdown selection. MSForms.MultiPage : Tabbed interface control. MSForms.CheckBox OptionButton : Selection toggles. Microsoft Learn How to Add to VB6 vb6 unicode control by Microsoft Forms 2.0 Object Library 5 Jul 2023 —

Integrating Microsoft Forms 2.0 Object Library in VB6 If you’re still developing in Visual Basic 6.0 (VB6), you’ve likely encountered the limitations of the standard intrinsic controls. They are functional but visually dated and lack modern features like true transparency or advanced data binding.

The Microsoft Forms 2.0 Object Library (FM20.DLL) is a powerful alternative. Originally designed for VBA (Office Macros), this library can be leveraged in VB6 to give your applications a more refined look and access to unique control properties. What is the Microsoft Forms 2.0 Object Library?

The Microsoft Forms 2.0 Library is a set of ActiveX controls used primarily by Microsoft Office applications to create UserForms. It includes enhanced versions of standard controls like TextBoxes, ComboBoxes, CheckBoxes, and CommandButtons. Key benefits over standard VB6 controls:

Unicode Support: Unlike standard VB6 controls, FM20 controls handle Unicode strings, making internationalization much easier.

Transparency: Many FM20 controls support a BackStyle property that allows for a transparent background.

Appearance: They offer a slightly more modern, "Office-like" aesthetic compared to the Windows 95-style intrinsic controls. How to Add the Library to Your VB6 Project

To use these controls, you must first reference the library in your project: Open your VB6 Project. Go to Project > Components (or press Ctrl+T). Scroll down and check Microsoft Forms 2.0 Object Library. Click Apply or OK. You will now see a new set of icons in your Toolbox. Key Controls and Features

The FM20 library doesn't just replicate standard controls; it adds depth to them. 1. The TextBox Control

The FM20 TextBox supports various alignment options and can handle larger amounts of text more efficiently than the standard VB.TextBox. Its ability to display Unicode characters is its strongest selling point for modern legacy maintenance. 2. The ComboBox and ListBox

These are significantly more robust. They allow for multiple columns without complex API calls. You can set the ColumnCount property and define ColumnWidths easily in the Properties window. 3. Image Control

The FM20 Image control is often used for simple skinning because it handles transparency better than the standard VB6 Image or PictureBox controls. Important Considerations and Pitfalls

While FM20 is powerful, it wasn't originally designed for standalone VB6 applications. Keep these "gotchas" in mind: The Distribution Dilemma

FM20.DLL is not redistributable. This is the most critical rule. Unlike other ActiveX controls, you cannot legally package FM20.DLL with your application installer. It is intended to be installed by Microsoft Office.

Solution: Only use this library for internal corporate tools where you are certain every machine has Microsoft Office installed. If you are selling software to the public, avoid FM20. Focus and Tab Order Issues

FM20 controls sometimes struggle with the VB6 Tab order and focus management. You may find that the GotFocus and LostFocus events behave slightly differently than their intrinsic counterparts. Container Requirements

FM20 controls are "windowless" controls. They rely on their container to handle many windowing messages. Occasionally, placing them directly on a VB6 Form works fine, but placing them inside a standard VB6 Frame can sometimes cause refreshing issues. Example: Populating a Multi-Column ComboBox

Here is a quick snippet of how easy it is to use the FM20 ComboBox with multiple columns:

Private Sub Form_Load() With ComboBox1 .ColumnCount = 2 .ColumnWidths = "50 pt; 50 pt" .AddItem "Item 1" .List(0, 1) = "Description 1" .AddItem "Item 2" .List(1, 1) = "Description 2" End With End Sub Use code with caution. Conclusion

The Microsoft Forms 2.0 Object Library is a "secret weapon" for VB6 developers who need Unicode support or multi-column lists without moving to .NET. As long as you are developing for an environment where Office is already present, it can significantly enhance your UI capabilities.

Unlocking the Power of Microsoft Forms 2.0 Object Library in VB6

As a developer, you're likely no stranger to the world of Visual Basic 6 (VB6). Released in 1998, VB6 was a popular choice for building Windows desktop applications, and its legacy still lives on in many enterprise environments. One of the key features that made VB6 so powerful was its ability to interact with other Microsoft Office applications through Automation. In this blog post, we'll dive into the Microsoft Forms 2.0 Object Library, a powerful tool that allows you to create rich, interactive forms in your VB6 applications.

What is the Microsoft Forms 2.0 Object Library?

The Microsoft Forms 2.0 Object Library is a COM (Component Object Model) library that provides a set of objects, properties, and methods for creating and manipulating forms in VB6. This library was first introduced as part of Microsoft Office 97, and it's been a part of subsequent Office releases, including Office 2000, XP, 2003, and 2007.

The Forms 2.0 library provides a rich set of controls and tools for building complex, data-driven forms. With this library, you can create forms that include features like:

Why Use the Microsoft Forms 2.0 Object Library in VB6?

So, why would you want to use the Microsoft Forms 2.0 Object Library in your VB6 applications? Here are just a few compelling reasons:

Getting Started with the Microsoft Forms 2.0 Object Library in VB6

To start using the Microsoft Forms 2.0 Object Library in your VB6 applications, you'll need to follow these steps:

  1. Register the Library: First, you'll need to register the Forms 2.0 library on your development machine. You can do this by running the following command in the Run dialog box (Windows key + R): regsvr32 fm20.dll
  2. Add a Reference to the Library: Next, open your VB6 project and add a reference to the Forms 2.0 library. To do this, select Project > References from the menu, then check the box next to Microsoft Forms 2.0 Object Library.
  3. Create a New Form: Once you've added a reference to the library, you can create a new form in your VB6 project. To do this, select Insert > Form from the menu, then choose frm as the form type.

Example Code: Creating a Simple Form with the Microsoft Forms 2.0 Object Library Mastering the Microsoft Forms 2

Here's an example code snippet that demonstrates how to create a simple form using the Microsoft Forms 2.0 Object Library:

Option Explicit
' Create a new instance of the frm form
Dim frm As New Form1
Private Sub Main()
    ' Initialize the form
    frm.Caption = "My First Forms 2.0 Form"
    frm.Width = 400
    frm.Height = 300
' Add a command button to the form
    Dim cmdButton As CommandButton
    Set cmdButton = frm.Controls.Add("fm20.CommandButton", "cmdOK")
    cmdButton.Caption = "OK"
    cmdButton.Left = 100
    cmdButton.Top = 100
' Show the form
    frm.Show 1
End Sub

In this example, we create a new instance of the Form1 form, then set its caption, width, and height properties. We then add a command button to the form using the Controls.Add method, and set its caption, left, and top properties. Finally, we show the form using the Show method.

Conclusion

The Microsoft Forms 2.0 Object Library is a powerful tool for building rich, interactive forms in VB6. With its range of controls and tools, you can create complex, data-driven forms that enhance the user experience. Whether you're building a new application from scratch or modernizing an existing VB6 application, the Forms 2.0 library is definitely worth exploring.

Additional Resources

The Risky Allure of Microsoft Forms 2.0 (FM20.DLL) in VB6 If you’ve ever found yourself staring at the standard Visual Basic 6.0 toolbox and wishing for more "modern" features—like checkboxes in list boxes or native Unicode support—you’ve likely stumbled upon the Microsoft Forms 2.0 Object Library.

Stored in FM20.DLL, this library is a siren song for VB6 developers. It looks powerful, but it comes with strings attached that could sink your application's stability and legal compliance. Here is everything you need to know before you add that reference. What is the Microsoft Forms 2.0 Object Library?

Unlike the standard VB6 controls (which are part of the Windows Common Controls), the Forms 2.0 library was designed specifically for Microsoft Office UserForms. It provides a suite of windowless controls including:

Enhanced ComboBoxes: Support for multiple columns and custom list widths.

Unicode Support: One of the few ways to handle non-ANSI characters in legacy VB6.

Layout Tools: Specialized containers like the MultiPage and Frame controls. How to Add It (If You Must)

If you decide to proceed, you can add these controls through the References dialog in the VB6 IDE:

Add object libraries to your Visual Basic project - Microsoft Support

Microsoft Forms 2.0 Object Library ) is a legacy component primarily used in VBA but occasionally referenced in Visual Basic 6.0 (VB6) to access enhanced UI features like Unicode support multi-column list boxes Spiceworks Community Core Features of the Library

While designed for VBA UserForms, it provides several advantages over standard VB6 controls: Unicode Compatibility

: Unlike standard VB6 controls, which are mostly ANSI-based, Forms 2.0 controls can display Unicode characters, making them useful for internationalization. Multi-Column Controls : It includes

controls that natively support multiple columns without complex API calls. Right-to-Left (RTL) Support : Controls exhibit bidirectional characteristics when the RightToLeft

property is enabled, aiding in localization for RTL languages. Advanced UI Elements : Access to controls like the objects, as well as a specialized DataObject for handling clipboard operations. How to Add the Library in VB6 Open your VB6 project. Navigate to Project > References Microsoft Forms 2.0 Object Library in the list and check the box. If not listed and navigate to C:\Windows\System32\FM20.DLL on 64-bit systems). Google Groups Critical Limitations & Risks

Developers should be cautious when using this library in compiled VB6 applications:

Add object libraries to your Visual Basic project - Microsoft Support

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

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

Using the Microsoft Forms 2.0 Object Library (FM20.DLL) in Visual Basic 6.0 is highly discouraged because it is not legally redistributable and is known to cause severe stability issues.

Below is a complete blog post breaking down the technical details, the deployment risks, and the best practices for handling this library in legacy VB6 projects. ⚠️ Stop Using Microsoft Forms 2.0 in VB6!

If you are maintaining a legacy Visual Basic 6.0 application, you have likely encountered the Microsoft Forms 2.0 Object Library (FM20.DLL). Developers originally gravitated toward this library because it offered advanced UI capabilities that native VB6 controls lacked—such as native Unicode support, and multi-column dropdowns in ComboBoxes and ListBoxes.

However, relying on this library in standalone desktop applications is a massive liability. Let's explore why you should avoid it and how to strip it out of your code safely. 🛑 The Core Problems with FM20.DLL 1. It is Legally Non-Redistributable

According to official Microsoft documentation, you are not allowed to distribute FM20.DLL with your custom application. This library belongs exclusively to Microsoft Office and a few other specific applications. If you package your VB6 installer with this DLL, you are violating Microsoft's licensing terms. 2. The Infamous "System Error" on Clean Machines

Because the library is not part of the standard Windows operating system, your VB6 program will crash immediately with a "System Error" or "Component not correctly registered" prompt on any computer that does not have Microsoft Office installed. 3. Chronic Instability and Memory Leaks

Microsoft explicitly states that the Forms 2.0 components are not supported or recommended for use in compiled development containers like VB6 or C++. Developers frequently experience sudden "Out of Memory" errors and IDE crashes when trying to load or manipulate these controls within the VB6 environment. 🛠️ How to Purge It from Your Project

If your project is already tangled up with Microsoft Forms 2.0 controls, removing them manually through the IDE can be a nightmare. Here is the faster, community-proven way to swap them back to native VB controls: Back up your project folder entirely before proceeding. Close your project in Visual Basic 6.0. End Sub Private Sub MultiPage1_Change() Caption = "Current

Open a advanced text editor (like Notepad++) and use the "Replace in Files" function.

Search for the string MSForms. and replace it with VB. across all of your .frm (Form) files. This forces the controls to revert to intrinsic VB6 controls. Open your project in the VB6 IDE.

Navigate to Project -> Components and uncheck the Microsoft Forms 2.0 Object Library. Save your project. 💡 What Should You Use Instead?

For Multi-Column Lists: Use the standard ListView control included in the Microsoft Windows Common Controls (MSCOMCTL.OCX), which allows for highly customizable columns and is freely redistributable.

For Unicode Support: If your app strictly requires Unicode, use third-party ActiveX controls designed for VB6, or consider migrating the UI logic to a modern framework like .NET's WinForms.

For Modern Development: If the goal is business forms or surveys, ignore desktop controls entirely and utilize cloud solutions like Microsoft Forms (online) or Power Apps.

Are you running into a specific error while trying to compile or register a VB6 application?

Thread: Removing component Microsoft Forms 2.0 object library

Using the Microsoft Forms 2.0 Object Library in VB6 Visual Basic 6.0 remains a staple for legacy enterprise applications. One of its most powerful features is the ability to integrate the Microsoft Forms 2.0 Object Library (FM20.DLL). This library allows developers to use modern-looking, versatile controls originally designed for Microsoft Office VBA. Why Use the FM20 Library?

The standard VB6 toolbox is functional but visually dated. The Microsoft Forms 2.0 library offers several advantages:

Unicode Support: Unlike standard VB6 controls, FM20 controls handle Unicode strings.

Modern Aesthetics: Controls feature smoother borders and better transparency handling.

Enhanced Functionality: The Combo Box and List Box in this library support multiple columns out of the box.

Consistency: It ensures your VB6 application UI matches the look of Office 97-2003 macros. How to Reference the Library

To use these controls, you must manually add the reference to your project: Open your VB6 Project. Go to Project > Components (Ctrl+T). Scroll down to Microsoft Forms 2.0 Object Library. Check the box and click Apply.

New icons for Buttons, TextBoxes, and Combo Boxes will appear in your Toolbox. Key Controls and Features 1. Multi-Column ListBoxes

The standard VB6 ListBox is limited to a single column of data. The FM20 version allows you to set the ColumnCount property. You can populate it using the List property array, making it ideal for displaying database records without a complex grid control. 2. Advanced TextBox Properties

The FM20 TextBox supports the EnterFieldBehavior property, which determines if text is automatically selected when the user tabs into the field. It also provides better control over scrollbars and word-wrapping. 3. The Image Control

While VB6 has an Image control, the FM20 version handles transparency and various image formats more gracefully within the Form container. Important Deployment Warnings

While powerful, the Microsoft Forms 2.0 Object Library was not designed for standalone redistribution. You must consider these factors before deploying your app:

Licensing: The FM20.DLL is not a "redistributable" file. It is typically installed by Microsoft Office. If the end-user doesn't have Office installed, your application may fail to load the controls.

The "Legal" Workaround: To ensure the DLL is present on machines without Office, users can install the Microsoft ActiveX Control Pad, which includes a licensed version of the library.

Windowless Nature: Many FM20 controls are "windowless," meaning they don't have a unique hWnd. This makes them incompatible with certain Windows API calls that require a window handle. Best Practices for Stability

Avoid Mixing Libraries: Use either standard VB6 controls or FM20 controls for a specific form. Mixing them can lead to "z-order" issues where controls overlap incorrectly.

Error Trapping: Always include robust error handling during the Form_Load event to catch missing DLL dependencies.

Use for Unicode: If your app needs to display non-Latin characters (like Cyrillic or Kanji), FM20 is often the easiest path in VB6. If you'd like, I can help you: Write a code snippet for a multi-column ListBox Debug "Object library not registered" errors Find Unicode-compatible alternatives to FM20

Overview

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.

Step 1: Add the Reference

Key Objects and Controls in the Library

Microsoft Forms 2.0 Object Library (VB6) — Overview & Quick Guide

1. The MultiPage Control

The MultiPage control is a container that hosts multiple pages, each acting as a separate form area. It’s perfect for property sheets and wizards.

' Add a page at runtime
MultiPage1.Pages.Add "NewPage", "Page 2", 1

' Remove first page MultiPage1.Pages.Remove 0

' Change selected page index MultiPage1.Value = 1 ' Second page

Events: Click, Change, BeforeDragOver, BeforeDropOrPaste.