Thread: DOS fullscreen

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    15

    DOS fullscreen

    I would like to put my DOS programs into fullscreen using some sort of code (in MS Visual C++ 6.0 standard). On windows 98 you can press a button on the DOS console to make it fullscreen, but you can't in XP. And beside the point, I want to make my programs fullscreen without the user having to do anything, so some sort of code would be nice. (wow, that was redundant)
    I am the Uber Noob

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    You can try a trick like this:
    Code:
    #include <windows.h>
    
    void
    fullscreen()
    {
      keybd_event(VK_MENU, 0x38, 0, 0);
      keybd_event(VK_RETURN, 0x1c, 0, 0);
      keybd_event(VK_RETURN, 0x1c, KEYEVENTF_KEYUP, 0);
      keybd_event(VK_MENU, 0x38, KEYEVENTF_KEYUP, 0);
    }
    It simulates Alt+Enter to bring an application into full screen mode.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    15
    Works perfectly, many thanks, Prelude
    I am the Uber Noob

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Here are some more robust versions you can use as well.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  2. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  3. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 07:14 PM