Display UNICODE Characters Using MS Forms Object Library

Naveed Memon

Version Compatibility: Visual Basic 6

More information:
Have you ever wondered of using any language characters other than English in Your Visual Basic Project? Its now possible using UNICODE, no extra font to be installed. You can embed any language from Chinese to Japanese, Arabic to Urdu, Hindi and hundreds of more.. For complete list of supported languages please go to www.unicode.org

To embed UNICODE characters into your VB application, add a built-in component named "Microsoft Forms 2.0 Object Library" from Components Dialog Box. You can get Components dialog box by Pressing CTRL+T

This gives you 14 new controls in your toolbox, including TextBox, Label, CommandButton, ListBox, ComboBox, CheckBox, Radio Buttons and a few more. They seem to be like default VB controls but are different in working. These controls support UNICODE characters.

Here is the code for displaying UNICODE characters in a new TextBox control:

Controls to be placed on the Form:

  • Two VB's default Text Boxes from Toolbox and a CommandButton
  • One TextBox control from newly added Controls
The code below will give you the unicode versions of the number range you specify in the two text boxes.

ChrW(number) is the actual function that performs the conversion.

Try using the range from 1500 to 1600 to see Urdu characters in your TextBox.

Instructions: Copy the declarations and code below and paste directly into your VB project.