
Signature
Regards,
Lloyd Dupont
NovaMind Software
Mind Mapping at its best
www.nova-mind.com
> Maybe a Console.Write()
> (as opposed to WriteLine() , I suggested only Write())
There are certainly ways to emulate the behavior. IMHO, the thing to
keep in mind though, is that the console itself does some handling of
user input, including maintaining a buffer of previously entered lines
and knowing the difference between text on the screen that the user
entered versus text on the screen displayed by the application.
I haven't played around with it enough to see how writing something
explicit to, for example, display the default text, handling
backspacing, etc. if the user wants to enter new text and providing a
default if they don't, would interact with the existing console input
behavior. But I'm not sure it would work well.
This would be a pretty easy thing to do in a Windows application that
has a "console" window completely implemented by the application. But
in an actual console application, with a real console window?
I'm not sure that there _is_ a straightforward reliable way to do what
the OP asked for.
Pete
Martin Hart - 28 Sep 2007 08:38 GMT
Pete:
Thanks for your interest and insight. I can see that this was not
'intended behavior' and as such, will steer my efforts in another direction.
Thanks to all for the help,
Martin.
Peter Duniho escribió:
>> Maybe a Console.Write()
>> (as opposed to WriteLine() , I suggested only Write())
[quoted text clipped - 19 lines]
>
> Pete
Amry - 28 Sep 2007 13:24 GMT
You can try this:
Console.Write("Name: ");
System.Windows.Forms.SendKeys.SendWait("Amry");
string name = Console.ReadLine();