Microsoft Forms 20 Object Library Vb6
Microsoft Forms 20 Object Library Vb6
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 control’s license key is missing (common when moving projects between machines without Office/VB6 installed). Fix: On the development machine, ensure Office or VB6 is properly installed. For distribution, you must include the FM20.DLL and ensure proper licensing using a package and deployment tool.
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
| 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. | microsoft forms 20 object library vb6
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
' Copy text to clipboard DataObj.SetText "Hello from VB6" DataObj.PutInClipboard
: 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. Furthermore, the library provided a suite of controls
Integrating Microsoft Forms 2.0 Object Library in VB6: A Complete Guide
: Supports Unicode characters and multi-line text alignment.
Subclassing native controls to handle Unicode string paint messages ( TextOutW ). Best Practices and Technical Considerations The control’s license key is missing (common when
Example 1: Populating a Forms 2.0 ComboBox with Multiple Columns
Dim myForm As MSForms.UserForm Set myForm = New MSForms.UserForm myForm.Caption = "Hello from MSForms" myForm.Width = 300 myForm.Height = 200
: 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.
: Offers standalone precise value adjustment controls.
Support for multiple columns and custom list widths.