conio.h --> window (int left, int top, int right, int bottom)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

There's a function in Borland C conio.h

window (int left, int top, int right, int bottom)

how can i provide the same function in VB.Net
 
Assume the follow is the layout of a console screen
---------------------------------------------
| |
| |
|------------------|------------------------|
| x | |
|------------------|------------------------|
If I want to place a text on a certain area of the screen (for example Area
X in the above console screen), I use window(int, int, int, int) method.
Arguments are left, top, right and bottom coordinates of the window, and
after calling this method cout (or Console.out.writeline in C#) will print in
that console area until you create a new one. Point to remember:
window-arguments are not pixel coordinates, they refer to 80 colums and 24
rows of text. This makes placing text exactly inside (for example) an area
somewhat difficult... Header file is conio.h.
 
You are referring to the console IO C/C++ header file.

You cannot do this with VB.NET 2002/3. This functionality is however going
to be made available in VS2005 for which you can download a beta copy from
Microsoft.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
There's a function in Borland C conio.h

window (int left, int top, int right, int bottom)

how can i provide the same function in VB.Net

The only way to do that currently is via the API using P/Invoke.
SetConsoleCursorPosition comes to mind here... You'll want to look at
the console functions documented in msdn.
 
Console will be available, or the ability to import header files and use
them in code instead of <ImportDLL>?
 
Console will be available, or the ability to import header files and use
them in code instead of <ImportDLL>?

The console in 2005 lets you set colors, position, etc. It just exposes
more of the underlying console api's.
 
Ahhh I gotcha.

Tom Shelton said:
The console in 2005 lets you set colors, position, etc. It just exposes
more of the underlying console api's.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top