The screen repeatedly flashes to a blank text-mode screen when you build from the development environment in Visual C++

Article translations Article translations
Article ID: 126031 - View products that this article applies to.
This article was previously published under Q126031
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When you build from the development environment in Visual C++, the screen repeatedly flashes to a blank text-mode screen with no text on it. A text cursor may show up if you move the mouse while the blank screen is showing. The screen returns to Visual C++ and then blanks out again. The blanking occurs at least twice but possibly more times during the entire build process.

CAUSE

The default settings for the Command Prompt on Microsoft Windows Vista (32-Bit), Microsoft Windows Server 2003, Microsoft Windows XP (32-Bit), Microsoft Windows Server 2000, Microsoft Windows NT, Microsoft Windows Millennium Edition, Microsoft Windows 98, or Microsoft Windows 95 are set to full screen.

Note This issue does not appear on Microsoft Windows XP (64-Bit), Windows Vista (64-Bit), or Microsoft Windows 2008.

RESOLUTION

Depending on whether you are on Windows Vista (32-Bit), Windows Server 2003, Windows XP (32-Bit), Windows Server 2000, Windows NT, Windows Millennium Edition, Windows 98, or Windows 95, the resolution process is different:
  • For Windows NT, Windows 2000 Server, Windows XP (32-Bit), and Windows Server 2003, you must set the options for one of the following to "Windowed":
    • The environment settings of all Windows NT Command Prompts.
    • The program Vcspawn.exe, which Visual C++ runs as a background process.

      Note Vcspawn.exe is not present with Visual Studio 2005 and Visual Studio 2008, so this option is not applicable.
  • For Windows 95, Windows 98, and Windows Me, you must reset the options for one or all of the following:
    • _Default.pif
    • Conagent.exe
Follow the instructions given in the "More Information" section.

MORE INFORMATION

For Visual C++ versions earlier than 8.0

On Windows NT, Windows Server 2000, Windows XP, and Windows Server 2003, Visual C++ repeatedly invokes a background process called Vcspawn.exe for each command-line tool executed by the development environment. Tools such as Cl.exe, Link.exe, and Bscmake.exe run in the Vcspawn.exe environment, which is a 32-bit console application.

Usually Vcspawn.exe is invoked as a hidden window and you never see it. However, if the setting for Vcspawn.exe is in "full screen" mode, the screen switches to text mode each time Vcspawn.exe is invoked. No text is actually sent to the Vcspawn screen, so the screen appears blank.

On Windows 95, Windows 98, and Windows Me, Vcspawn.exe is affected by the presence of the _Default.pif and the settings of the Conagent.exe file. If a _Default.pif is in the path, its properties will be used for all invoked console applications. Often, a _Default.pif is left over from a previous Windows 3.1 or 3.11 installation. Windows 95, Windows 98, and Windows Me do not create one during installation. If _Default.pif is not present, Windows 95, Windows 98, and Windows Me use the properties of Conagent.exe.

For Visual C++ 8.0 and Visual C++ 9.0

VCSpawn.exe is not present in these versions.

On Windows NT, Windows Server 2000, Windows XP (32-Bit), or Windows Server 2003

Use one of the following two procedures to correct the problem:

Steps to reset default configuration of all command prompts

On Windows NT:
  1. Go to the Windows NT Control Panel.
  2. Double-click the Console icon.
  3. Click the General Settings or Options tab.
  4. Select Window under the Display Options group.
  5. Click OK.
On Windows Server 2000, Windows XP (32-Bit), Windows Server 2003, and Windows Vista (32-Bit):
  1. Run Regedt32, which is located in the \System32 subfolder of the Windows NT root folder.
  2. Open the \HKEY_CURRENT_USER\Console branch of the registry tree.
  3. Set the FullScreen value to 0.
  4. Exit the registry editor.

Steps to reset configuration for just Vcspawn.exe by using Regedt32 in Visual C++ versions that are earlier than Visual C++ 8.0

Use the following process to add a registry entry so only Vcspawn's settings are not "full screen."
  1. Run Regedt32, which is located in the \System32 subdirectory of the Windows NT root directory.
  2. Open the \HKEY_CURRENT_USER\Console branch of the registry tree.
  3. Choose Add Key on the Edit menu to add a node called:
    C:_MSVC20_BIN_vcspawn.exe
    						
    If Visual C++ is installed in a different directory or on a different drive, use the following form for the Key Name:
    <drive>:_DIR1_DIR2_DIR3..._vcspawn.exe
    						
    Leave the Class field empty.
  4. With "vcspawn.exe" highlighted, click Add Value on the Edit menu. In Value Name, type FullScreen. In Data Type, select REG_DWORD. Click OK, and then add a value of 0 (zero).
  5. Exit the registry editor, and restart Visual C++.

Steps to reset configuration for just Vcspawn.exe without using Regedt32 in Visual C++ versions that are earlier than Visual C++ 8.0

If you are unfamiliar with the system registry and do not want to reset the default configurations for the Command Prompt, use the following procedure to reset the settings for Vcspawn. This procedure adds the same registry entry.

NOTE: if you have a fast machine, you may have trouble performing some of the following steps and you need a larger project. Therefore, if you have a fast machine, use one of the previous methods to work around the problem.

If you are compiling a large project, you can switch tasks and see the minimized Vcspawn.exe icon. Resetting the attributes of this icon will reset the attributes of Vcspawn.
  1. Open a large project, such as the sample project CTRLBARS or SUPERPAD supplied with Visual C++.
  2. Choose to Rebuild All.
  3. Press ALT+TAB to see the minimized Vcspawn icon in the corner of the screen.
  4. Quickly open the system menu, and follow the steps shown in the "Steps to Reset Default Configuration of ALL Command Prompts" section of this article.
NOTE: You must save the configuration before the development environment finishes the build process. If you do not, the Vcspawn.exe window will be terminated, the icon will disappear and any changes you made will not be saved.

On Windows 95, Windows 98, and Windows Me:

Use one of the following procedures to correct the problem.

Steps to reset configuration of _Default.pif

  1. In the Explorer, right-click the _DEFAULT file with the MS-DOS icon next to it in your Windows directory.
  2. Choose Properties.
  3. Click the Screen tab.
  4. Choose the Window option and click Apply, then OK.

Steps to reset configuration of Conagent.exe

  1. Make sure there is no _Default.pif file in your path; specifically check your Windows directory.
  2. Follow the instructions for steps 2, 3, and 4 above given for resetting _Default.pif on the file Conagent.exe in your Windows or Windows System directory.

Properties

Article ID: 126031 - Last Review: February 28, 2014 - Revision: 5.0
APPLIES TO
  • Microsoft Visual C++ 6.1
  • Microsoft Visual C++ .NET 2003 Standard Edition
  • Microsoft Visual C++ .NET 2002 Standard Edition
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ 2008 Express Edition
Keywords: 
kbnosurvey kbarchive kbsweptvs2008 kbtshoot kbide kbprb kbsetup KB126031

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