Skip to main content

20 Object Library Vb6: Microsoft Forms

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. The Microsoft Forms 2.0 Object Library extends VB6’s UI capabilities significantly. From multi-column list boxes to tabbed dialogs and clipboard access, this library is a must-know for any serious VB6 programmer.

' Load an image at runtime Image1.Picture = LoadPicture("C:\logo.bmp") ' Stretch to fit container Image1.PictureSizeMode = fmPictureSizeModeStretch microsoft forms 20 object library vb6

' Zoom (maintain aspect ratio) Image1.PictureSizeMode = fmPictureSizeModeZoom Useful for numeric increments without a separate textbox. Microsoft has not updated FM20

In this article, we will dive deep into the —what it is, how to reference it in VB6, how to programmatically use its objects, and common pitfalls to avoid. What is the Microsoft Forms 2.0 Object Library? The Microsoft Forms 2.0 Object Library (FM20.dll) was originally introduced with Microsoft Office 97 and later bundled with subsequent versions of Office, Windows, and Visual Studio 6.0. It provides a set of ActiveX controls and supporting objects used primarily to build custom forms and dialogs. From multi-column list boxes to tabbed dialogs and

By understanding how to properly reference, code, and deploy FM20-based controls, you can deliver more professional and functional legacy applications. Just remember to handle versioning, deployment, and the occasional registration issue, and you'll be well-equipped to leverage this powerful library.

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 Private Sub cmdAdd_Click() Dim nextID As Integer nextID = lstEmployees.ListCount + 101 Dim newRow As String newRow = CStr(nextID) & ";" & txtName.Text & ";" & cboDept.Text lstEmployees.AddItem newRow txtName.Text = "" cboDept.Text = "" End Sub