Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximise a console window ?

Status
Not open for further replies.

norseal

Technical User
Oct 18, 2003
4
Hello,

Please tell me how to maximise a DOS console window. I am trying to go from 2.6 to 6pro. I designed ver6 reports
for use with 2.6 code that calls an exe and despite Screen=OFF and _Screen.Visible=.F. when
we print focus reverts to the desktop.

By maximised I mean full screen 80x25 lines.
Target machines are Win 98.

I have done FindWindow, ShowWindow and followed all
examples I can find and they work perfectly for
real 'windows' but not console windows.

Does anybody have a work around for this ?

Thanks,
Steve.
 

Also, what do you mean by "reverts to the desktop".

You mentioned 80 x 25 screens. We don't have these in Windows.

If you could explain exactly what you are trying to achieve, I'm sure someone can help.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Reading between the lines you are running a Dos application written in 2.6 but you are calling a VFP 6 executable to show some reports.

Does your shortcut call FoxDOS directly or by way of cmd?

Geoff Franklin
 
You can try this. It functions even for dos windows.

procedure WindowRestore
***************************************
lparameters pnHWND, plZoomed
BringWindowToTop(pnHWND) SetForegroundWindow(pnHWND)
ShowWindow(pnHWND, iif(plZoomed, SW_SHOWMAXIMIZED, SW_RESTORE))
return


Tomas
 

I suppose you need to switch you DOS Prompt window from Windows mode to DOS mode.
Try Left Alt + Enter to switch between the modes when you need.

Generally, you could also set the properties to always run you app in DOS mode, but I don't think this would be possible in your case, as you constantly switch between Windows and DOS modes.
 
Thanks for the suggestions everyone. I will try to be as
explicit as possible. At the start of the day we

START A BATCH FILE THAT WILL (FULL SCREEN)
START A 2.6 DOS PROGRAM (STILL FULL SCREEN)
WE THEN "RUN INVPRN.EXE" OUR VER6 PRINT PROGRAM.
OUR 2.6 WILL THEN MINIMIZE TO THE TASKBAR (BY ITSELF)

OUR 2.6 PROG DOES NOT CEASE, IT JUST
WAITS FOR THE NEXT INVOICE.

WHEN I TRY faq184-4262 THE DOS CONSOLE WINDOW
ON THE TASK BAR WILL BECOME DEPRESSED BUT
NOT ACTIVE.

I really would like to move into the Visual world
and rid myself of the PCL forever. I know I
could just ALT+TAB to get back to the 2.6
window, but these computer as suppposed
to work for us.

Thanks in Advance,
Steve Smith.
 
If you have HWND of dos window, you can use my example what I writed here before. If you does not have hwnd, you can use utility from Command 'NIRCMD win activate title "YourDosWindowTitle"' will help you.
On NT/2000/XP system you can set window title by command TITLE in BAT file.

Tomas
 
Dear Tomas,

We thank you for your suggestion of NIRCMD. It is an
excellent little program and was exactly what we
were looking for.

My best regards,
Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top