| Property | Description | |----------|-------------| | Value | Current value/state of control | | Text | Text content (TextBox, ComboBox) | | Caption | Display text (Label, Button, Frame) | | Enabled | Enable/disable control | | Visible | Show/hide control | | Left , Top , Width , Height | Position and size | | BackColor , ForeColor | Color settings | | Font | Font properties | | TabIndex | Tab order |
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) ' Allow only numbers If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 End If End Sub
When distributing your VB6 application:
If you are looking for more advanced input fields, does your project require large text entries, such as a ? Understanding if you need a long answer vs. short answer can help dictate your control choices. Microsoft Forms 2.0 Object Library Vb6 - Google Groups
| 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
Microsoft Forms 2.0 Object Library provides controls (TextBox, Label, CommandButton, ListBox, ComboBox, Frame, OptionButton, CheckBox, Image, RefEdit, etc.) used in classic VB6 forms and in userforms for Office VBA. It ships as FM20.DLL and exposes the runtime and design-time objects for creating and manipulating form controls.
While originally designed for Microsoft Office (think VBA UserForms), this library is fully accessible from VB6. It offers a treasure trove of controls that are far more advanced than the standard VB6 toolbox. Microsoft Forms 2
Once added, a new set of control icons will appear at the bottom of your VB6 Toolbox. These include alternative versions of text boxes, labels, command buttons, toggle buttons, combo boxes, list boxes, tab strips, and scroll bars. Technical Implementation and Code Examples 1. Creating a True Transparent Label