How To Activate a Full Screen MS-DOS or Console Application

Article translations Article translations
Article ID: 196103 - View products that this article applies to.
This article was previously published under Q196103
Expand all | Collapse all

SUMMARY

A full screen MS-DOS application or a full screen Win32 console application can be activated from a Win32 application by using the Platform SDK's APIs SetForegroundWindow() and ShowWindow().

MORE INFORMATION

Assuming the caption of the MS-DOS application or the Win32 console application is Test.exe, the following sample code activates the minimized MS-DOS or Win32 console application:
   HWND hwndConsole = NULL;
   hwndConsole = FindWindow(NULL, "Test.exe");
   if(NULL != hwndConsole)
   {
      SetForegroundWindow(hwndConsole);
      ShowWindow(hwndConsole, SW_MAXIMIZE);
   }
				

Properties

Article ID: 196103 - Last Review: July 11, 2005 - Revision: 3.2
APPLIES TO
  • Microsoft Platform Software Development Kit-January 2000 Edition
Keywords: 
kbhowto kbwndwprop kbwndw KB196103

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com