The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
fullscreen
Discuss fullscreen in the C Programming forum on Dev Shed. fullscreen C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 14th, 2003, 03:50 AM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
fullscreen
im a newbie working on a windows console type program and was wondering how to go about making it run in full screen?
thanks 
|

February 14th, 2003, 01:09 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Set your focus to the console and type Alt-Enter to go to full screen mode. Type alt-enter again to go back to windowed mode.
|

February 14th, 2003, 09:28 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I know that much I was hoping someone could help me out with programing it to run fullscreen when you run it.
thanks
|

February 15th, 2003, 01:41 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
|
There is no offical way to do this (although there is probably an undocumented function or alt-enter could not work either)
You can make a shortcut to the program and setup "run fullscreen" there.
|

February 16th, 2003, 03:09 AM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I finally found a tutorial that showed an easy way to go bout it.
http://www.subduck.com/pages/sources.php
thought id paste it here for anyone else that may find use of it.
#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);
}
Thanks
|

February 16th, 2003, 03:22 AM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
"easy way"  sorry iīm laughing....
Donīt forget to SetFocus() and SetForegroundWindow() before this, or you will send the key sequence to another running program if your program doesnīt have the focus or is backgrounded... But then - in WinXPīs default configuration, SetForegroundWindow() does not work anymore 
Last edited by M.Hirsch : February 16th, 2003 at 05:33 AM.
|

February 16th, 2003, 04:40 AM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I'm sure there are all kinds of ways to go about it. I'm not to excited with the idea of writing an app and then zip'n it up with a premade shortcut when i could just write the app to run fullscreen, and i definately wasn't gonna have a user run it hold alt and push enter everytime.
|

February 16th, 2003, 05:32 AM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
Just to make this clear: i wasnīt laughing at you but on this code and the explanations that came with it. Itīs just wrong. Also we just recently had the discussion about why not to put functions in header files.
To explain this code a little more: keybd_event() does NOT switch to fullscreen mode. It is simulating pressing keys. Here it is ALT+ENTER. In some cases this will switch your app to fullscreen. In some it just wonīt.
Eg. it will put it back in windowed mode if you call it twice or if the user did alredy start the program in fullscreen mode. But you canīt check if it is already running in fullscreen mode either. Also it would add a page break in your Word document, if Word was the application with the focus in the moment you call this code. IMHO itīs not a good approach. But:
Quote: | I'm sure there are all kinds of ways to go about it. I'm not to excited with the idea of writing an app and then zip'n it up with a premade shortcut |
Sorry i was wrong about the shortcut. I just checked, it cannot be done like this either. Seems like your solution is the only way although i still donīt like it  Just make sure your app is the window with the focus.
M.
|

February 16th, 2003, 05:40 AM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
|
Update: The "correct" way
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|