Microsoft Forms 20 Object Library Vb6 < EXCLUSIVE · 2025 >
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
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.
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
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
Unlocking the Microsoft Forms 2.0 Object Library in VB6 If you are maintaining legacy Visual Basic 6 (VB6) applications or writing VBA macros, you have likely encountered the Microsoft Forms 2.0 Object Library (FM20.DLL). While it is primarily designed for Office UserForms, it offers a suite of versatile controls and features that can be highly useful in specialized scenarios. Key Benefits and Features
The Forms 2.0 Library provides a different set of tools compared to the standard VB6 intrinsic controls. microsoft forms 20 object library vb6
Enhanced Control Set: Access a variety of specialized UI elements like MultiPage, TabStrip, SpinButton, and Image controls.
Clipboard Interaction: The MSForms.DataObject is a powerful tool for sophisticated clipboard handling beyond simple text, allowing you to manage data formats more precisely.
Rich Collections: The library organizes elements into logical structures like the Controls, Pages, and Tabs collections, making it easier to programmatically iterate through complex UI layouts.
Bidirectional Support: Controls can exhibit right-to-left characteristics, which is essential for developing localized applications for certain languages. How to Add the Library to Your Project
To use these features, you must explicitly reference the library in your development environment: Open your VB6 or VBA project. Go to Tools → References.
Locate and check the box for Microsoft Forms 2.0 Object Library.
If it is not listed, use the Browse button to find FM20.DLL in your system folder (typically found in System32 or SysWOW64). Crucial Redistribution and Licensing Warnings
Before you start building, there are critical legal and technical "gotchas" to keep in mind: Collections, controls, and objects (Microsoft Forms)
Review: "Microsoft Forms 2.0 Object Library" in VB6
Overview
- The Microsoft Forms 2.0 Object Library (FM20.DLL) supplies ActiveX controls—most notably the TextBox, Label, CheckBox, OptionButton, ComboBox, ListBox, Frame, CommandButton, Image and the MultiPage/TabStrip-like controls—commonly used to build user interfaces in VB6 and VBA environments.
- It was intended primarily for use with UserForms in VBA (Office) but is often used in classic VB6 projects to get richer controls than the native VB6 toolbox provides.
Strengths
- Familiar, high-level controls: Developers accustomed to VBA userforms will find the API and event model intuitive.
- Rich text-related features: TextBox and RichText-related options (e.g., IME support, password masking, multiline with automatic word wrap) work well for typical form inputs.
- Consistent behavior across Office-hosted userforms and VB6 apps (when FM20 is present).
- Small footprint: As a single DLL, it’s easy to reference and distribute in many enterprise environments that already have Office installed.
- Useful additional controls: Controls like the SpinButton, Slider, and MultiPage (if present) add UI patterns VB6 lacks natively.
Weaknesses
- Licensing and redistribution: FM20.DLL is a Microsoft component distributed with Office and certain versions of Windows; redistributing it with applications can violate licensing and is unsupported. That makes deployment problematic for standalone VB6 apps.
- Versioning and compatibility: Different Office/Windows installations can have differing FM20 versions; binary compatibility/behavior can vary and lead to runtime errors or subtle differences.
- Registration and system-wide impact: FM20 is a system-wide COM DLL—registering/unregistering affects other applications. Incorrect registration can break Office userforms or other apps.
- Limited styling and customization: Controls are functional but dated—no modern theming, limited custom drawing, and less flexible layout compared with modern UI toolkits.
- Security concerns: Historically, FM20.DLL has been involved in ActiveX/COM-related security issues; using it increases attack surface compared with self-contained UI components.
- Not supported by Microsoft for new development: It’s legacy tech; Microsoft recommends using newer frameworks (WinForms/.NET, WPF, UWP, or modern web UIs) for new projects.
Technical notes for VB6 developers
- Reference setup: In VB6 IDE, set a reference to “Microsoft Forms 2.0 Object Library” (FM20.DLL). After referencing, controls can be created at design-time (by adding them to the toolbox with Components) or created dynamically via CreateObject or New.
- ProgIDs/Types: Common ProgIDs include Forms.TextBox.1, Forms.ComboBox.1, etc. The library exposes standard properties and events (e.g., Enter/Exit, Change, KeyPress).
- Deployment: Avoid shipping FM20.DLL with your installer. Instead:
- Prefer using native VB6 controls where possible.
- If FM20 is essential, require target machines to have a supported Office/Windows component that includes FM20, and document this prerequisite.
- Alternative approaches:
- Use VB6 native controls or third-party control suites (e.g., ComponentOne, Infragistics, VBAccelerator, or other commercial control packs) that are designed for redistribution.
- For modern apps, migrate UI to .NET (WinForms/WPF) or web front-ends and keep VB6 logic in COM components if needed.
- Common runtime issues and fixes:
- "Class not registered" or missing FM20.DLL on target machines — check registration (regsvr32) and confirm correct DLL bitness (32-bit VB6 requires 32-bit FM20).
- Controls not appearing in toolbox — use Project → Components to add “Microsoft Forms 2.0 Object Library”.
- Unexpected behavior across Office versions — test on all target Office/Windows combinations.
Recommendations
- For maintenance of existing VB6 applications where FM20 is already in use: continue using it cautiously, ensure target environments include the appropriate FM20 version, and add installation prerequisites to your installer/documentation.
- For new development or redistribution: avoid relying on FM20. Use native VB6 controls, third-party redistributable control suites, or migrate the UI to a supported modern platform.
- If you must use FM20 in a distributed app: document the requirement clearly, detect and warn at install-time if FM20 is missing, and prefer enterprise-only deployments where you control the environment.
Concise verdict
- Useful for rapid UI work in legacy VB6/VBA contexts where Office is guaranteed on target machines, but problematic for redistributable production apps due to licensing, deployment, and compatibility risks. Prefer native or third-party redistributable controls—or migrate to modern UI frameworks—when building or distributing new software.
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 The Risky Allure of Microsoft Forms 2
Here is the text regarding the Microsoft Forms 2.0 Object Library in the context of VB6 (Visual Basic 6.0) .
Common Issues and Solutions with FM20.DLL
Adding the Library to Your VB6 Project
- Go to Project → References
- Scroll to "Microsoft Forms 2.0 Object Library"
- Check the box and click OK
Or add controls to Toolbox:
- Project → Components (Ctrl+T)
- Select "Microsoft Forms 2.0"
- Controls will appear in Toolbox
Example: Dynamic Font Creation
Dim newFont As stdole.IFontDisp Set newFont = New stdole.StdFont newFont.Name = "Segoe UI" newFont.Size = 10 newFont.Bold = True
Set CommandButton1.Font = newFont
(Note: The stdole library is required for IFontDisp; it’s automatically referenced when you add the Forms 2.0 library.)
Comparison with VB6 Native Controls
| Feature | Forms 2.0 | VB6 Native | |---------|-----------|------------| | MultiLine TextBox | ✓ | ✓ | | Password character | ✓ | Limited | | MultiPage control | ✓ | ✗ (use SSTab) | | Triple-state checkbox | ✓ | Limited | | SpinButton | ✓ | ✗ (need UpDown) | | Distribution | Requires fm20.dll | Built-in |
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.
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: The Microsoft Forms 2
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.
Title: The Enduring Bridge: The Role of the Microsoft Forms 2.0 Object Library in Visual Basic 6 Development
Introduction
In the landscape of software development, few tools have left as indelible a mark as Visual Basic 6.0 (VB6). Released in 1998, it represented the pinnacle of Rapid Application Development (RAD), allowing programmers to build robust Windows applications with unprecedented speed. Central to the VB6 experience was its visual designer, a "drag-and-drop" environment that abstracted complex Windows API calls into simple objects. However, beneath the surface of the standard toolbox—comprising buttons, text boxes, and labels—lay a powerful and often misunderstood component: the Microsoft Forms 2.0 Object Library (FM20.DLL). This essay explores the technical significance, the utility, and the complex legacy of the Forms 2.0 library within the VB6 ecosystem.
The Genesis and Architecture
To understand the Microsoft Forms 2.0 Object Library, one must look beyond VB6 itself. The library was not originally designed solely for Visual Basic; it was the engine behind Microsoft Office's UserForms. When Microsoft transitioned Office applications like Excel and Access to a standardized development model, they needed a control library that was lightweight, scriptable, and capable of running within the memory constraints of the host application.
Technically, the library is an ActiveX component (FM20.DLL). In VB6, while the default controls are intrinsic to the runtime (msvbvm60.dll), the Microsoft Forms 2.0 controls are external ActiveX objects. This distinction is subtle but vital. It meant that while standard VB6 controls were tightly coupled with the language runtime, Forms 2.0 controls were "in-process" servers that could be shared across the Microsoft Office suite. This architecture allowed for a unified look and feel between custom dialog boxes in Excel and standalone applications created in VB6, a significant advantage for enterprise developers building integrated office solutions.
Features and Functional Superiority
For the intermediate VB6 developer, the Forms 2.0 library offered features that were surprisingly advanced for the time. Unlike the standard VB6 textbox, which was essentially a wrapper for the Windows Edit control, the Forms 2.0 text box offered richer functionality. It supported features like auto-size behavior and more sophisticated event models, which were necessary for the dynamic requirements of VBA macros.
Furthermore, the library provided a suite of controls that were not always present in the standard VB6 toolbox. The "SpinButton," "ScrollBar," and "TabStrip" controls were native to Forms 2.0 and offered a different aesthetic and behavioral set than their standard VB6 counterparts. Perhaps most importantly, the Forms 2.0 controls were generally "lightweight" regarding resource consumption when hosted within Office applications, and they handled Unicode data more gracefully than many of the older intrinsic VB6 controls, making them an attractive option for developers building internationalized software in the late 1990s.
The Double-Edged Sword: Deployment and Dependencies
Despite its power, utilizing the Microsoft Forms 2.0 Object Library in a standalone VB6 application came with significant caveats. In the world of Windows development, dependency management is the Achilles' heel of many projects. Because FM20.DLL was an ActiveX component, developers were required to ensure its presence on the target machine. While this was almost guaranteed on machines with Microsoft Office installed, it was not a standard component of the Windows operating system itself.
This created a deployment paradox. A developer could use Forms 2.0 to create a seamless UI that looked and behaved exactly like an Excel dialog, but if they attempted to distribute their application to a user without Office, the application would fail. The licensing model was also a point of contention. While the controls were free to use, their distribution rights were tied to the presence of a licensed Microsoft product, often complicating the setup routines of commercial software. This forced many developers to stick to the intrinsic VB6 controls or third-party OCX files to avoid "DLL hell" and licensing headaches.
Legacy and Modern Context
As the development world moved from VB6 to the .NET Framework, the relevance of specific libraries like Forms 2.0 has waned, yet the library remains a functioning artifact of the COM (Component Object Model) era. Today, FM20.DLL is still present on millions of Windows machines, a testament to the backward compatibility efforts of Microsoft. It remains a bridge between the automation capabilities of Office VBA and standalone executable development.
However, the library serves as a cautionary tale in software engineering regarding the reusability of components. It demonstrated the power of shared codebases across different products (Office and Visual Studio), but it also highlighted the complexities of versioning and distribution. Modern frameworks like .NET WPF or WinForms have solved many of these issues through the Global Assembly Cache (GAC) and side-by-side execution, but they built upon the lessons learned from the dependencies of libraries like Microsoft Forms 2.0.
Conclusion
The Microsoft Forms 2.0 Object Library represents a fascinating chapter in the history of software development. It was more than just a collection of buttons and scrollbars; it was a strategic attempt by Microsoft to unify the development experience across its flagship products. For the VB6 developer, it was a powerful tool that offered advanced features and Office integration at the cost of increased deployment complexity. While the era of VB6 has passed, the library stands as a monument to the era of ActiveX and COM—a time when the line between an application and its components was both a source of great power and great frustration.
The Microsoft Forms 2.0 Object Library 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
You can add the library to your project through the following steps: Open your project in the VB6 IDE. Go to the Project menu and select References.
Scroll through the list and check Microsoft Forms 2.0 Object Library.
If it is not listed, click Browse and navigate to your System32 (32-bit Windows) or SysWOW64 (64-bit Windows) folder to find FM20.DLL.
💡 Pro Tip: Adding a UserForm to your project in the VB Editor will often add this reference automatically. 📦 Key Controls Included Why do I not see the Microsoft Forms 2.0 Object Library?
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!
Why Use It in VB6?
Although VB6 has its own intrinsic controls (e.g., VB.CommandButton), the Microsoft Forms 2.0 controls offer specific advantages:
- Windowless Controls – Many MSForms controls are lightweight and do not have window handles (hWnd). This reduces resource usage and improves drawing performance.
- Office Compatibility – If you are building an add-in or automating Office from VB6, using MSForms ensures visual consistency with Excel or Word user forms.
- MultiPage & TabStrip – These tabbed interfaces are more polished in MSForms compared to using SSTab (Sheridan) or manually coding tabs in VB6.
- Better Unicode Support – MSForms handles Unicode text more reliably than some older VB6 intrinsic controls.