-
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)
-
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.
-
Works perfectly, many thanks, Prelude
-
Here are some more robust versions you can use as well.
gg