Console Forms

This is a discussion on Console Forms within the C# Programming forums, part of the General Programming Boards category; Hi guys, I'm trying to find a way to make a console program that would kinda work like a windows ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    11

    Console Forms

    Hi guys, I'm trying to find a way to make a console program that would kinda work like a windows program, no need for the mouse just keyboard inputs where I can go up and down on text boxes and maybe a menu, but not necessarely is there any tutorials or just a general idea on how it would work?

    thanks

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You probably can't do that without some of your own programming. I wrote a complete set of those sort of functions (including popup boxes and such) that worked in DOS using Turbo Pascal some 15-20 years ago.

    It would probably be possible to use ncurses or pdcurses to solve the problem with only a little bit of effort.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Catch the KeyDown event and set control focus, maybe?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Magos View Post
    Catch the KeyDown event and set control focus, maybe?
    No, the original poster wants to have "forms" in a console program, not a windows program that behaves like a console program. (Unless I got it all wrong)

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,587
    Hey, do not lure the poor OP into some bad habits. Short answer: there is no way. Consoles were not made for that kind of purpose.
    If you to use a real GUI (textboxes and yada, yada), then learn to do so instead of trying to hack the console or sitting hours trying to figure out ways around it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Short answer: Make your own custom console form.

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    11
    I'm more then willing to make a custom console form, I just dont know where to start, I kinda got an idea but not really, even if I were to know in C++ I then can move it into c#

  8. #8
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I have made custom consoles before, but not using .NET. Otherwise I would email you some code. Derive a class from the regular text input class (I forget what its called in .NET-ese) and work up from there. You will find this is much easier to do in C# than C++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Incorporating Console and Windows Forms
    By Junior89 in forum C++ Programming
    Replies: 2
    Last Post: 11-07-2007, 09:36 PM
  2. Full Screen Console
    By St0rmTroop3er in forum C++ Programming
    Replies: 1
    Last Post: 09-26-2005, 09:59 PM
  3. Problems with a simple console game
    By DZeek in forum C++ Programming
    Replies: 9
    Last Post: 03-06-2005, 01:02 PM
  4. Console Functions Help
    By Artist_of_dream in forum C++ Programming
    Replies: 9
    Last Post: 12-04-2004, 02:44 AM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 09:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21