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

Posted on 2003-03-24
Medium Priority
Last Modified: 2013-12-03
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...
Question by:mccainz2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 28

Expert Comment

ID: 8198613
Have you considered just using an invisible picturebox?

Author Comment

ID: 8198656
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.
LVL 28

Accepted Solution

AzraSound earned 2000 total points
ID: 8198681
The picturebox is one of those that should already be included in your application if you are distributing the VB runtimes, etc.  It would not require you distributing an extra control, registering it, etc.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 8198746
Azra, let me look into that........

Expert Comment

ID: 8199637
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?

Author Comment

ID: 8212073
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.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question