Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple question I guess...

Status
Not open for further replies.

vonguise

Programmer
Jun 17, 2000
1
SE
I just want to know how to center text in a dosshell...<br><br>I happen to know how to do it in windows but in DOs...ohhh no no!<br><br><br>thanks<br><br><br>/joakim
 
dos is pure Console, there are no actually commands I know of that'll center it, unless you specifally start a text at a x,y location. in C++ this would be the gotoxy command of the conio.h class(which stands for console input/output, havent used it in a while) <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
x_start position = (x_screen_width) / 2 - (length_of_text) /2;
gotoxy(x_start_position,y_start_position);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top