dos screens in c

Discussion in 'C Programming' started by Rick, Feb 21, 2006.

  1. Rick

    Rick Guest

    In linux if you press alt+f1 Alt+f2 etc you get a different virtual screen
    and can do so up to f6. Is it possible to write a program in c to do the
    same in Dos? If so is it very difficult and what roughly is required.

    Thanks Rick
    Rick, Feb 21, 2006
    #1
    1. Advertising

  2. "Rick" <> writes:
    > In linux if you press alt+f1 Alt+f2 etc you get a different virtual screen
    > and can do so up to f6. Is it possible to write a program in c to do the
    > same in Dos? If so is it very difficult and what roughly is required.


    It's not possible to do that in standard C on Linux, DOS, or any other
    system. A program that does such a thing has to use system-specific
    extensions. Try asking in a system-specific newsgroup.
    comp.os.msdos.programmer *might* be a good place to ask, but I don't
    read it myself; take a look at the newsgroup before posting.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Feb 21, 2006
    #2
    1. Advertising

  3. Rick

    Grumble Guest

    Rick wrote:
    > In linux if you press alt+f1 Alt+f2 etc you get a different virtual screen
    > and can do so up to f6. Is it possible to write a program in c to do the
    > same in Dos? If so is it very difficult and what roughly is required.


    <Waaay off-topic>
    You might want to check http://www.gnu.org/software/screen/
    Grumble, Feb 22, 2006
    #3
  4. Rick

    Jack Klein Guest

    On Tue, 21 Feb 2006 22:38:29 GMT, "Rick"
    <> wrote in comp.lang.c:

    > In linux if you press alt+f1 Alt+f2 etc you get a different virtual screen
    > and can do so up to f6. Is it possible to write a program in c to do the
    > same in Dos? If so is it very difficult and what roughly is required.
    >
    > Thanks Rick


    You could probably do it in non-standard, platform-specific, off-topic
    C in some horribly complicated way, but there is a much, much easier
    way.

    [very off-topic from here on down]
    Make a directory somewhere. Create a shortcut to cmd.exe. Name the
    short cut "F1". Copy the shortcut and paste 5 copies. Name the
    copies "F2" through "F6".

    Then do the following for each shortcut:

    Highlight it. On the file menu, select Properties. On the "shortcut"
    tab, put the cursor in the "shortcut key" box. For the shortcut named
    "F1", press the three key combination Ctrl-Alt-F2, Ctrl-Alt-F2 for
    "F2", and so on.

    This might not take effect until you reboot. But then pressing
    Ctrl-Alt-F1 will bring up a console windows with a command prompt.

    I find Ctrl-Alt plus function key combination a better choice than
    just Alt function key on Windows because a lot of Windows programs use
    Alt function key shortcuts.

    [ok, off-topic all done]

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
    Jack Klein, Feb 22, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam
    Replies:
    1
    Views:
    405
  2. Ben Fairbank
    Replies:
    2
    Views:
    5,403
  3. john san
    Replies:
    19
    Views:
    728
    Diez B. Roggisch
    Feb 18, 2005
  4. tomhr
    Replies:
    27
    Views:
    1,402
    Mike Wahler
    Jan 12, 2006
  5. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    267
    Michele Dondi
    Jan 22, 2004
Loading...

Share This Page