|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 ![]() |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
I know that much I was hoping someone could help me out with programing it to run fullscreen when you run it.
thanks |
|
#4
|
|||
|
|||
|
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.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
"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. |
|
#7
|
|||
|
|||
|
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.
|
|
#8
|
|||
|
|||
|
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:
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. |
|
#9
|
|||
|
|||
|
Update: The "correct" way
Found the function to do this on the 'net (the NT4-way should also work for W2K / WXP):
http://www.geocities.com/nickrepin/winprog/fullscr.txt |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > fullscreen |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|