ActiveX? Isn't that a dead technology?

You might hear this very often when talking about Visual Basic 6 or ActiveX controls. But we still have a strong client base using our ActiveX version in Visual Basic 6, Delphi, Sybase PowerBuilder or MS Access.

And we have committed to support this technology with the same innovation and developer power. We know that it takes time to port such legacy applications to newer technologies such as Windows Forms or WPF. Therefore, we are supporting our user base as best as possible with new versions, updates and technical support.

Today, I would like to introduce a feature that has been implemented in the latest version 16.0. In TX Text Control ActiveX, the Page Rendering Engine is accessible throught the PageImage property. It returns an image of the specified page which can be used with the Picture property of a Form object, PictureBox control or Image control.

To display a specific page on a PictureBox in VB6, the following code in required:

Picture1.Picture = TXTextControl1.PageImage(1, pcAll)

In order to save the image as an enhanced Metafile, the SavePicture method can be used:

SavePicture TXTextControl1.PageImage(1, pcAll), "test.emf"

The following constants are available:

Constant Description
pcBackground The image contains the background of the page.
pcHeadersAndFooters The image contains the header and the footer of the page.
pcMainText The image contains the page's text contents.
pcAll The image contains all parts.