Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys,
I was wondering how to recreate the graphics that QuickVB has.
That said, I would like to recreate syntax highlighting, menus and click events in my own console. I have the source for QuickVB but I do not know how to use this.

Any help would be appreciated.
Thanks, iProgramIt.
Posted
Comments
Sergey Alexandrovich Kryukov 20-Jul-15 22:01pm    
Why making menus in console? If you need menus, use System.Windows.Forms, WPF, or some other UI windowed frameworks. Console is designed for simpler interface, typically non-interactive, where all input is provided in command line.
What you mean has long gone, superseded by window applications. It's quite possible to do with console, there are such products, but it hardly worth the effort.
—SA
iProgramIt 22-Jul-15 1:43am    
Hmm, yes. I know that, but for some odd reason I like old-style graphics. QuickVB is a demonstration that this is possible and if you have Windows XP or older, MSEDIT is also a demonstration. I do not currently want Windows Forms or the like. Anyway, thank you for the input.
Sergey Alexandrovich Kryukov 22-Jul-15 3:21am    
Then please see Solution 2. It's quite possible.
—SA

Here is my advice: don't waste your time on that (see my comment to the question). Most reasonable console applications use command line for user input, if any input is required at all. If some pieces if information are too big for that, some parameters can be file name with more advanced format presenting input data. (As an exclusion, there are also fully-fledged command interpreters, but I don't think you have to consider this approach.)

By the way, please see my utility class library for highly manageable and easy to use command-line parsing, and another library I reference in my article: Enumeration-based Command Line Utility[^].

—SA
 
Share this answer
 
iProgramIt wrote

Hmm, yes. I know that, but for some odd reason I like old-style graphics. QuickVB is a demonstration that this is possible and if you have Windows XP or older, MSEDIT is also a demonstration. I do not currently want Windows Forms or the like. Anyway, thank you for the input.
The you can use more fine-grain control of System.Console: output of characters to an arbitrary position in console coordinates and multi-color output. This is the tutorial covering most of the topics you need: http://broadcast.oreilly.com/2010/08/understanding-c-text-mode-games.html[^].

Based on that, you can produce any text-basic windowed UI, including menus.

Moreover, you can use Unicode and hence pseudo-graphics using box-drawing characters: https://en.wikipedia.org/wiki/Box-drawing_character[^].

You need to setup proper encoding, not the one set by default, but one of the UTFs: https://msdn.microsoft.com/en-us/library/system.console.outputencoding%28v=vs.110%29.aspx[^];
see also the notes on supported UTF encodings and the use of a font: https://msdn.microsoft.com/en-us/library/system.console%28v=vs.110%29.aspx[^] (in the section "Unicode Support for the Console").

—SA
 
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