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



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0

This article was previously published under Q196103

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);
   }
				

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbhowto kbWndw kbWndwProp KB196103