473,785 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's the best way to make a Terminal window?

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!
Nov 21 '05 #1
6 2939
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?


Presumably you can just use a multiline textbox, so you can set the
background, font colour etc as you like.
Nov 21 '05 #2
A textbox is not easy when it comes to placing text at certain locations on
the screen.

"Leon Mayne [MVP]" <l.*********@ue a.ac.uk> wrote in message
news:eK******** ******@TK2MSFTN GP10.phx.gbl...
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?


Presumably you can just use a multiline textbox, so you can set the
background, font colour etc as you like.

Nov 21 '05 #3
Terry Olsen wrote:
A textbox is not easy when it comes to placing text at certain
locations on the screen.


That's true. I thought you might be working on a line by line basis.

Can you not use a panel and use GDI+ to place strings wherever you want on
the panel?
Nov 21 '05 #4
Gee...don't know. Never used GDI+. Is there a tutorial on it?
"Leon Mayne [MVP]" <l.*********@ue a.ac.uk> wrote in message
news:uN******** *****@TK2MSFTNG P09.phx.gbl...
Terry Olsen wrote:
A textbox is not easy when it comes to placing text at certain
locations on the screen.


That's true. I thought you might be working on a line by line basis.

Can you not use a panel and use GDI+ to place strings wherever you want on
the panel?

Nov 21 '05 #5
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!

Nov 21 '05 #6
Terry,

I cannot see what is wrong with Leons advise to use a textbox.

When that is in multiline mode.

With a toolbar wit toolbar buttons docked in top
And the textbox docked as fill

Than you can make in my opinion the nicest dialog windows as you want.

And the user can make it exactly in the size he wants by resizing his form.

Just my idea

Cor

"Terry Olsen" <to******@hotma il.com> schreef in bericht
news:uz******** ******@TK2MSFTN GP14.phx.gbl...
Gee...don't know. Never used GDI+. Is there a tutorial on it?
"Leon Mayne [MVP]" <l.*********@ue a.ac.uk> wrote in message
news:uN******** *****@TK2MSFTNG P09.phx.gbl...
Terry Olsen wrote:
A textbox is not easy when it comes to placing text at certain
locations on the screen.


That's true. I thought you might be working on a line by line basis.

Can you not use a panel and use GDI+ to place strings wherever you want
on
the panel?


Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
941
by: Dan Richert | last post by:
i wrote a script that accesses files at random from the locatedb database. it then prints a random line from the file it's accessed to the terminal screen. this runs continuously and at times makes the terminal behave strangely (chaning font colors, output writing over itself on the screen, etc) -- i like this strange behavior, but the behavior i don't like is when the terminal window closes on its own. i suspect that the script isn't...
5
2298
by: Sara_S | last post by:
I am ready to move my ASP web site onto a remote host. The problem is that when I use Terminal Services to see the host machine, the error does not show up. (I was told that debugging info is only sent to the 'console' session, no others). And the whole thing locks up when there is a server error. How can I see the server errors through Terminal Services? Thanks, Sara
2
3577
by: egbert | last post by:
When I start the following script in a gnome-terminal: #!/usr/bin/env python import os print "hello gnome-terminal" print os.environ I see the expected results in the same gnome-terminal window. However starting this same script via a launcher in a panel,
1
1668
by: Thomas W | last post by:
I've produced a "binary" version of a python-script using Py2Exe and when run on WinXP it shows a terminal window for a brief moment then the window disappears. How can I avoid this? I want the script to run without being visible at all. Thanks in advance, Thomas
0
1534
by: dynfax | last post by:
When I use Access 97 with Terminal Services, and the terminal window is minimized, the popup form displays - and when i reset the focus to the terminal window the popup form displays. In Access2003 - the same Terminal window, when the form programatically displays and the terminal window is minimized the form does not display. Another issue, when I change the default printer, an invisible form suddenly becomes visible - also only in...
2
2232
by: Achraf | last post by:
Hi all, I have a c program under linux, while running, it opens a new terminal windows using a system call. I would like to display messages on both windows. But I can't find a way to specify the terminal window I want to write in. The program is for chat and I want to keep a terminal window to write incoming messages, and use the other one for operation like sending
16
2724
by: John Salerno | last post by:
Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 where scriptname is my module name and any subsequent arguments are the names of Linux packages to install. Running the script as above will create this line: sudo aptitude install package1 package2 ...
0
983
by: Tommy Grav | last post by:
I have a program that does a lot of iterations and would like to follow its progress by having it print out the current iteration number as it progresses. How do I do this so that it appears like a counter that increases in the same place in the terminal window? I am using python2.5 on a Mac OSX and its terminal tcsh window. Cheers Tommy
2
3861
by: zensunni | last post by:
I've been working with ncurses for my user output. But, I've reached a limitation. I'd like to resize the window, but ncurses doesn't have the power to do that. It has the option, but I think gnome nerfs some of the self-management properties of the terminal. In any case, is there any real good way to do this? I'm leaning towards gtkmm, but I want to be sure there wasn't anything more xwindows/terminal specific before I try my hand at...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.