|
-
Feb 13th, 2008, 10:04 AM
#1
Thread Starter
Addicted Member
[RESOLVED] DOS window in Full Screen
First let me say I understand that what I am asking is not reasonable, but the fact of the mater is that people dislike change, and better ways of doing things. So, this is a quest to make people comfortable.
For my application I call a batch file that runs a DOS program in a CMD window. It works fine except I need the CMD window to start in Full Screen (like the alt+enter hot key). Is there a way to have the window start up like this or is the alt+enter key need to be pressed manually?
Thanks for any input.
-RT
-
Feb 13th, 2008, 12:47 PM
#2
Re: DOS window in Full Screen
I don't know of a way to emulate those keys, but this might be acceptable
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Private Const SW_SHOWMAXIMIZED = 3
Private Sub MaximizeDOSWindow(Optional Caption As Variant)
Dim hwnd As Long
' if argument is omitted, don't care for window caption
If IsMissing(Caption) Then Caption = vbNullString
' find the window
hwnd = FindWindow("ConsoleWindowClass", Caption)
If hwnd Then
ShowWindow hwnd, SW_SHOWMAXIMIZED
End If
End Sub
Private Sub Command1_Click()
MaximizeDOSWindow
End Sub
-
Feb 13th, 2008, 02:45 PM
#3
Thread Starter
Addicted Member
Re: DOS window in Full Screen
This might work but I am using a shell
so the app is stopping at the shell and not processing any maximize code.
Is there a way to force the application to continue in the background?
-
Feb 13th, 2008, 05:31 PM
#4
Thread Starter
Addicted Member
Re: [RESOLVED] DOS window in Full Screen
I set the default CMD window properties to 'Full Screen'
This was done outside of the program
While it is resolved for me, I am still curious to find out if there is a way to do it in the application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|