Microsoft KB Archive/195256

{|
 * width="100%"|

PRB: Errors in Regular Project After Using VBCE Toolkit

 * }

Q195256

-

The information in this article applies to:


 * Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0
 * Microsoft Visual Basic Learning Edition for Windows, version 5.0
 * Microsoft Visual Basic Professional Edition for Windows, version 5.0
 * Microsoft Visual Basic Enterprise Edition for Windows, version 5.0

-

SYMPTOMS
When you try to run a regular (non-VBCE) project after working on Windows CE Toolkit for Visual Basic (VBCE) projects, the following error might occur:

Before it can be compiled, the Project must have a Startup Object specified. Go to the Project Properties dialog to specify the Object.

RESOLUTION
There are two ways to avoid the error:


 * When switching from VBCE projects to standard Visual Basic projects, first close the design environment, then reopen it.
 * Use the F5 key shortcut key to start the project or select Start on the Run menu.

MORE INFORMATION
The error described above occurs when a regular Visual Basic project, either new or existing, is opened after a VBCE project has been opened in the same session of the Visual Basic integrated design environment (IDE). The error indicates incorrectly that a Startup Object has not been specified.

Closing and reopening the design environment clears internal references to the VBCE toolkit and prevents the error.

Steps to Reproduce Behavior
 Open an existing VBCE project in Visual Basic. Open a new standard EXE project, closing the VBCE project. On the default Form1, add a CommandButton.  Add the following code to the CommandButton Click event procedure: MsgBox "OK"  Run the project by clicking the Start button on the toolbar. The error message described above is displayed even though the Startup Object for the new project is Form1.