Click here to Skip to main content
16,004,192 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I'v created a simple app that is going to be snow :) but as you know at console, when it writes dots as snow , it goes to next line and finally snow goes up instead of down, what should I do to make it right like snow (up to down)??
Thanks.
Posted

You need to use the escape codes to write characters at specific locations in the screen (see here[^]). But I am not sure how many of these are supported in the Windows command prompt window.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 14:24pm    
The advice is correct, but what a waist of time! Perhaps it's worth doing just once in lifetime our of curiosity. :-) My 5.
--SA
Richard MacCutchan 17-Nov-11 3:29am    
Indeed, but as we (used to) say in this country "the customer is always right"!
I think you need to use Console.CursorTop and CursorLeft to set the cursor position before writing each character. You will have to redraw the whole screen each time, though.

This type of application is rarely useful in the real world, so while console applications in general are a good learning device, there are better ways to spend your time than working out how to do graphical effects in the console.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Nov-11 14:25pm    
Good advice, my 5. As I just said in another comment, perhaps it's worth doing just once in lifetime our of curiosity. :-)
--SA
You can also use random location within the boundary area. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900