The ActiveX control csXImage has a DrawText function that allows text to be added to an image. This function fully supports the use of Unicode which means that characters from any language can be used provided that a suitable font is available. For example, this allows text to be written in Japanese, Korean, Chinese, Russian, and many other languages.
The use of Japanese characters is demonstrated with this simple VB application. The application is a single form which includes csXImage and a command button. When the button is clicked, a rough map of Japan is drawn and the names of some of the major cities are written using Kanji characters.
The map is first drawn by using the Polygon function. This draws an irregular shaped polygon made from joining a series of points. Four polygons are drawn to represent the main islands. The text is then written, with each city name centred below a small circle on the map.
The font used in this example is "Arial Unicode MS". This is not provided as part of our download. If you do not have this, but have an alternative font to use, the code can easily be edited to change the font.
This demo is available in two versions: one for use with Visual Basic 5 or 6, the other for use with Visual Basic.NET. The appropriate version can be downloaded from the links below.
To run this demo you need the csXImage trial ocx control installed on your system as well as MS Visual Studio.NET. The trial control and the example files are available below:
To run this demo you need the csXImage trial ocx control installed on your system as well as MS Visual Basic 5 or 6. The trial control and the example files are available below:
© Chestysoft, 2024.
This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.