Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching to fullscreen (Win32 Console)

Status
Not open for further replies.

Grodmar

Programmer
Jun 19, 2003
3
0
0
US
I'm trying to get my Win32 console application to start in fullscreen mode. Does anyone know how to start a console app in fullscreen, or how to switch between fullscreen & windowed mode? Thanks!
 
To switch between Windowed and fullscreen :
Alt + Enter

/JOlesen
 
Grodmar, I see your new to Tek-Tips, welcome [cheers]

Please note that cross posting is discouraged.

-pete
 
Thanks JOLESEN. But I knew about the Alt+Enter shortcut. I was wondering how to do it programmatically. I dont want the user to have to switch to fullscreen. I want my program to do it automatically.
 
You could try keybd_event with the following C code :-

keybd_event(VK_MENU,(BYTE)0,0,0);
keybd_event(VK_ENTER,(BYTE)0,0,0);
keybd_event(VK_ENTER,(BYTE)0,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,(BYTE)0,KEYEVENTF_KEYUP,0);


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top