HOWTO: Activate a Full Screen MS-DOS or Console Application

ID: Q196103


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
    on the following platforms: NT, Win95, Win98


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

Additional query words: SetFocus

Keywords : kbNTOS kbSDKPlatform kbWinOS95 kbWinOS98 kbWndw kbWndwProp
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 10, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.