?
Solved

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

Posted on 2003-03-24
6
Medium Priority
?
221 Views
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...
0
Comment
Question by:mccainz2
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 8198613
Have you considered just using an invisible picturebox?
0
 
LVL 5

Author Comment

by:mccainz2
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.
0
 
LVL 28

Accepted Solution

by:
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.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Author Comment

by:mccainz2
ID: 8198746
Azra, let me look into that........
0
 
LVL 1

Expert Comment

by:FunkyMeister
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?
0
 
LVL 5

Author Comment

by:mccainz2
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.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

580 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