Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to set console application full screen in code?

0 views
Skip to first unread message

Wilson Woo

unread,
Jan 8, 2001, 5:28:13 AM1/8/01
to
as title.
thanks.

Peter Below (TeamB)

unread,
Jan 8, 2001, 4:05:37 PM1/8/01
to
There is no simple API function to do this. If you need this for a specific
console program it is best to create a PIF file for that (you do that using
the Properties dialog for the console program in Explorer), set the execution
mode to full screen there. Another option is to fake Alt-Enter.

procedure TForm1.Button2Click(Sender: TObject);
begin
WinExec('edit.com', SW_SHOW );
Sleep( 500 );
keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), 0, 0 );
keybd_event( VK_RETURN, MapVirtualKey( VK_RETURN, 0 ), 0, 0 );
keybd_event( VK_RETURN, MapVirtualKey( VK_RETURN, 0 ), KEYEVENTF_KEYUP, 0
);
keybd_event( VK_MENU, MapVirtualKey( VK_MENU, 0 ), KEYEVENTF_KEYUP, 0 );
end;

Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: Till Feb.2001 i will only visit the groups on weekends, so be patient
if i don't reply immediately.

Graham Pyne

unread,
Jan 8, 2001, 6:07:55 PM1/8/01
to
"Wilson Woo" <wils...@hk.super.net> wrote in message
news:3A59963D...@hk.super.net...
> as title.
> thanks.

If you are using CreateProcess to start the console app. then all you need
to do is set the STARTUPINFO.dwFlags to STARTF_RUNFULLSCREEN.

hth
--
Graham Pyne (mailto:graha...@hotmail.com)

'Perilous to us all are the devices of an
art deeper than we possess ourselves.'
...Gandalf - Tolkien

Peter Below (TeamB)

unread,
Jan 10, 2001, 1:56:34 PM1/10/01
to
In article <3a5a48ef_1@dnews>, Graham Pyne wrote:
> If you are using CreateProcess to start the console app. then all you need
> to do is set the STARTUPINFO.dwFlags to STARTF_RUNFULLSCREEN.

Note that this seems to be a recent addition to the flag set, will probably
require Win2K to work.

0 new messages