Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,455 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,951 people online right now. Registration is fast and FREE... Join Now!




Run a C Program in Full Screen

2 Pages V  1 2 >  
Reply to this topicStart new topic

Run a C Program in Full Screen

Ricendithas
3 Aug, 2008 - 05:30 AM
Post #1

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 34


My Contributions
Is there such code that will change or will trigger the Command Prompt to be in full screen?

Thanks.
User is offlineProfile CardPM
+Quote Post

Hyper_Eye
RE: Run A C Program In Full Screen
3 Aug, 2008 - 10:05 AM
Post #2

D.I.C Head
**

Joined: 13 Sep, 2007
Posts: 72



Thanked: 4 times
My Contributions
I found the code here pretty easily with a google search. I would clean it up some.

http://www.codetoad.com/forum/24_25614.asp

User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Run A C Program In Full Screen
3 Aug, 2008 - 10:13 AM
Post #3

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
in windows? Well searching on MSDN I found this.

google also was kind to me and I found this.


User is offlineProfile CardPM
+Quote Post

Ricendithas
RE: Run A C Program In Full Screen
3 Aug, 2008 - 01:57 PM
Post #4

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 34


My Contributions
It seems that the codes there are not supported in C.
User is offlineProfile CardPM
+Quote Post

Hyper_Eye
RE: Run A C Program In Full Screen
3 Aug, 2008 - 02:08 PM
Post #5

D.I.C Head
**

Joined: 13 Sep, 2007
Posts: 72



Thanked: 4 times
My Contributions
QUOTE(Ricendithas @ 3 Aug, 2008 - 04:57 PM) *

It seems that the codes there are not supported in C.


You should be able to use it in C code. Just include windows.h. I have used Windows API in C applications many times.
User is offlineProfile CardPM
+Quote Post

Tennison
RE: Run A C Program In Full Screen
3 Aug, 2008 - 08:47 PM
Post #6

New D.I.C Head
*

Joined: 29 Feb, 2008
Posts: 35



Thanked: 1 times
My Contributions
Here's the code for fullscreen.

CODE

include <windows.h>


void "whatevernameyouwanttogiveit"()/* function definition for
                                                         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);
}


User is offlineProfile CardPM
+Quote Post

Ricendithas
RE: Run A C Program In Full Screen
4 Aug, 2008 - 07:02 AM
Post #7

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 34


My Contributions
thank you all for your help. smile.gif It's now working.
User is offlineProfile CardPM
+Quote Post

Codegamer
RE: Run A C Program In Full Screen
4 Aug, 2008 - 09:19 AM
Post #8

D.I.C Head
**

Joined: 4 May, 2008
Posts: 127


My Contributions
QUOTE(Tennison @ 3 Aug, 2008 - 09:47 PM) *

Here's the code for fullscreen.

CODE

include <windows.h>


void "whatevernameyouwanttogiveit"()/* function definition for
                                                         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);
}




My friend is asking: How about C++ fullscreen?

User is offlineProfile CardPM
+Quote Post

Hyper_Eye
RE: Run A C Program In Full Screen
4 Aug, 2008 - 09:53 AM
Post #9

D.I.C Head
**

Joined: 13 Sep, 2007
Posts: 72



Thanked: 4 times
My Contributions
QUOTE(Codegamer @ 4 Aug, 2008 - 12:19 PM) *

My friend is asking: How about C++ fullscreen?


It's the same thing.
User is offlineProfile CardPM
+Quote Post

Codegamer
RE: Run A C Program In Full Screen
4 Aug, 2008 - 10:00 AM
Post #10

D.I.C Head
**

Joined: 4 May, 2008
Posts: 127


My Contributions
QUOTE(Hyper_Eye @ 4 Aug, 2008 - 10:53 AM) *

QUOTE(Codegamer @ 4 Aug, 2008 - 12:19 PM) *

My friend is asking: How about C++ fullscreen?


It's the same thing.


He's saying that he got some errors...

User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Run A C Program In Full Screen
7 Aug, 2008 - 05:48 AM
Post #11

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 3,906



Thanked: 34 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
QUOTE
He's saying that he got some errors...

What errors?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Run A C Program In Full Screen
7 Aug, 2008 - 10:03 AM
Post #12

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,539



Thanked: 98 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
He's probably running Vista. Quite a few Vista machines (possibly all, I don't know) give an error saying that the OS is not compatible with fullscreen, or something similar.
User is offlineProfile CardPM
+Quote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
Time is now: 12/2/08 03:23PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month