The native VB6 controls use the ANSI character set for text properties. A well-known limitation of VB6 is its poor support for Unicode. However, the Microsoft Forms 2.0 controls provide better Unicode compatibility. They can handle characters beyond the ASCII range, such as international symbols, with greater reliability than the standard VB6 text boxes and labels.
Dim newFont As stdole.IFontDisp Set newFont = New stdole.StdFont newFont.Name = "Segoe UI" newFont.Size = 10 newFont.Bold = True
The file is usually located in the C:\Windows\System32 folder on 32-bit systems or the C:\Windows\SysWOW64 folder on 64-bit systems, though it may also reside within the Microsoft Office installation directory.
Understanding the Microsoft Forms 2.0 Object Library in VB6 The Microsoft Forms 2.0 Object Library ( FM20.DLL ) is a component often used in Visual Basic 6.0 (VB6) development. While originally designed for creating user forms in Microsoft Office applications via Visual Basic for Applications (VBA), developers frequently reference it in VB6 to utilize its unique control capabilities. What is the Microsoft Forms 2.0 Object Library?
This article delves deep into the Microsoft Forms 2.0 Object Library, exploring what it is, its core components, how to integrate it into your VB6 projects, and the crucial licensing and compatibility considerations that every developer should understand before relying on it. microsoft forms 20 object library vb6
Note on Ambiguity: Because both VB6 and MSForms contain controls with identical names (e.g., TextBox ), always explicitly dimension your variables using the appropriate library prefix to avoid compiler confusion:
Integrating the Microsoft Forms 2.0 Object Library in VB6: A Complete Guide
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.
Set up a connection to your database and create a "Command" (query) to pull the data you want in your report. : Go to Project -> Add Data Report . The native VB6 controls use the ANSI character
The Microsoft Forms 2.0 Object Library remains an effective solution for upgrading the interfaces of legacy applications. By leveraging its Unicode integration and advanced layout options, you can significantly extend the lifespan of your VB6 systems.
Features multi-column display capabilities.
Do not manually copy the DLL from your development machine. Instead, install a compatible Microsoft Office runtime environment on the client machine to resolve the licensing dependency legally. 7. Summary Comparison: Native VB6 vs. Microsoft Forms 2.0 Standard VB6 Controls Microsoft Forms 2.0 Controls Character Set ANSI only (No Unicode) Native Unicode support List/Combo Layouts Single-column only Native Multi-column layout arrays Transparency Simulated / Pseudo-transparent True background transparency Redistribution Freely redistributable ( MSMKT.cab ) Restricted; relies on local MS Office installs UI Rendering Classic Windows standard Modern, anti-aliased visual accents
Private Sub Form_Initialize() With lstEmployees .ColumnCount = 3 .ColumnWidths = "40;150;120" .AddItem "101;Alice Johnson;HR" .AddItem "102;Bob Smith;IT" .AddItem "103;Carol Davis;Finance" End With End Sub They can handle characters beyond the ASCII range,
Microsoft has not updated FM20.DLL in years, and it is not supported in .NET or VB.NET directly. However, for VB6 developers who need richer controls without third-party OCXs, Forms 2.0 is an excellent built-in solution.
Example 1: Loading a Unicode String into a Forms 2.0 TextBox
Thread: vb6 unicode control by Microsoft Forms 2.0 Object Library
If your application must run on machines without Microsoft Office, avoid FM20.DLL . Instead, look into these alternatives:
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.
Standard VB6 controls (like TextBox and ListBox ) do not support Unicode natively. They rely on the system's local ANSI code page, causing foreign characters to display as question marks ( ? ). Forms 2.0 controls are fully Unicode-compliant, allowing applications to display international character sets properly. 2. EnterKeyBehavior and Multi-line Improvements