Print line question

Z

Zach

Is there a way to stop the cursor dropping to the next line after a
Console.PrintLine()? "\b" and SendKeys.Send(...) or SendWait won't work.

Zach.
 
A

Arne Vajhøj

Is there a way to stop the cursor dropping to the next line after a
Console.PrintLine()? "\b" and SendKeys.Send(...) or SendWait won't work.

As far as I can see then Console does not have a PrintLine, but
it does have a WriteLine. Write instead of WriteLine may be what
you are looking for.

Arne
 
Z

Zach

As far as I can see then Console does not have a PrintLine, but
it does have a WriteLine. Write instead of WriteLine may be what
you are looking for.

Arne

Oh a typo, confusion, sorry. Question remains.
How to stop the cursor from dropping down after
Console.WriteLine("whatever");

Zach.
 
A

Arne Vajhøj

Oh a typo, confusion, sorry. Question remains.
How to stop the cursor from dropping down after
Console.WriteLine("whatever");

Have you tried:

Console.Write("whatever");

?

Arne
 
Z

Zach

Have you tried:

Console.Write("whatever");

?

Arne

No I didn't. Oh Oh.
Never do console stuff.
Feel a little embarrassed.
Was testing some code.
Thanks.

Zach.
 
J

Jeff Johnson

Oh a typo, confusion, sorry. Question remains.
How to stop the cursor from dropping down after
Console.WriteLine("whatever");

For reference, the "Line" in "WriteLine" is what's making it go to a
new--wait for it--line! Other methods do the same. (Specifically, methods
that end in "Line" add a newline sequence to the string they output.)
 
Z

Zach

For reference, the "Line" in "WriteLine" is what's making it go to a
new--wait for it--line! Other methods do the same. (Specifically, methods
that end in "Line" add a newline sequence to the string they output.)
Yes the "line" bit causes dropping to a new line. I have, in the mean
time, been referred to a site with all the Console etc options, so I am
better informed now. (I hardly ever use Console stuff, unless I want to
test some code, hence my ignorance.) Many thanks all the same and best
wishes for 2012.

Zach.
 
J

Jeff Johnson

Yes the "line" bit causes dropping to a new line. I have, in the mean
time, been referred to a site with all the Console etc options, so I am
better informed now. (I hardly ever use Console stuff, unless I want to
test some code, hence my ignorance.) Many thanks all the same and best
wishes for 2012.

My point is that it's not just Console stuff. StringBuilder.AppendLine(),
for example.
 
A

ajaytemp

Good question. I have for years been trying to get my ancient ANSI art from early 90s and late 80s.

ANSI art is just colored text on your console window. like the ms-dos command prompt.

anyhow.

i am sure there is a dll in the visual c studio for accessing the windows<->console GPU text API. It may be POSIX (ISO) compatible even.

Good luck!
 
A

Arne Vajhøj

For reference, the "Line" in "WriteLine" is what's making it go to a
new--wait for it--line! Other methods do the same. (Specifically, methods
that end in "Line" add a newline sequence to the string they output.)

That was how Wirth designed it more than 4 decades ago.

Arne
 
A

Ajay Shah

Yes, I missed that point you were making.Rightly so as well.

Zach.- Hide quoted text -

- Show quoted text -

string terminator bit. 0. i don't even want to know what hacker could
do with that and c++.

gpu has video mode 0 and 1. 3d game engines suck on ur pc because
they are stuck to video game programmers trying to build some type of
huge data structure (BSP) oout of what is good for a 2d GUI and good
for a 3d GUI too. doesn't work for a complex 3d game.

consoles and their GPU modes ?
 
J

Jeff Johnson

string terminator bit. 0. i don't even want to know what hacker could
do with that and c++.
gpu has video mode 0 and 1. 3d game engines suck on ur pc because
they are stuck to video game programmers trying to build some type of
huge data structure (BSP) oout of what is good for a 2d GUI and good
for a 3d GUI too. doesn't work for a complex 3d game.
consoles and their GPU modes ?

What in the hell are you babbling about?
 

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

Top