Link to home
Start Free TrialLog in
Avatar of mccainz2
mccainz2

asked on

Creating image as a text character and then....

I am emulating a vt-100 terminal using a flexgrid. Because a character in a flexgrid cell will not align flush with the borders of the cell (it always pads) I am going to use the cellpicture property to display text. To do this I will need to create an image on the fly which represents the ascii character I wish to represent. I assume I will be using GDI for this... Can someone please show me an example in VB of how to create a memory area to draw in, draw a text character in that area (specifying font and fontsize) and then passing that image to the cellpicture property of a flexgrid. 225X225 should be adequate for my fontsize...
Avatar of AzraSound
AzraSound
Flag of United States of America image

Have you considered just using an invisible picturebox?
Avatar of mccainz2
mccainz2

ASKER

cant use a picturebox as I have to use only those controls which already exist in the application. It is a fielded app and we cant require an update which would require admins logging on.
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Azra, let me look into that........
Actually, the more common approach to tossing items in over flexgrids are text boxes.

Curious what reasons lead you to emulate VT-100 with a flexgrid, most of the flexgrid applications aren't meant for highspeed data (since VT100 can rewrite/draw it's screen very fast and flexgrids will severely lack in that department on low end machines).

What controls do you have available to work with?
Yup, I was having some kind of mentalblock on the picturebox. I had somehow convinced myself that it would require GDI functions to write text into ....SHEESH!
Its so appalingly easy! Oh well, I did learn some interesting Font and Caret functions. THanks Azra.