As Leon said, you
'll need to use a Panel and draw on it with GDI+. There are some examples in
the SDK documentation. Search for DrawString method.
If you're going to handle things like color and character attributes, then
you'll need to create a screen buffer. It should probably be done by creating
a matrix of characters:
dim ScreenBuffer(80 ,25)
and drawing this matrix to the screen one line at a time. To handle
atrributes and color, you can create an additional buffer:
dim ScreenColors(80 ,25)
Then, using DrawString in the panel's Paint event, you can draw each row and
column to the panel. To draw your cursor, just use the DrawBox method. Use a
timer set to 1000 or so to re-draw the cursor and make it blink.
There are ways to optimize this approach; but that's where I'd start. Once
you get the hang of how that works, you can try other ways of speeding things
up to get your text displayed faster (if it's necessary). Personally, I find
GDI to be slow, so I use OpenGL for graphic output. If I need text, I have a
library that creates text characters as OpenGL display lists.
"Terry Olsen" wrote:
I need to make a terminal window to emulate special characters of a vintage
PC. I don't think I can use a console because you can't change its
font...can you?
So what is the best way to make a terminal window that has a scrollback and
is easy to position the cursor? How does hyperterminal & SmartTerm do it?
Thanks!