DOCUMENT:Q195256 04-NOV-1998 [vbwin] TITLE :PRB: Errors in Regular Project After Using VBCE Toolkit PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:1.0,5.0 OPER/SYS:WINDOWS KEYWORDS:kbVBp500 kbIDE kbWinCE100 kbToolKit wce ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Windows CE Toolkit for Visual Basic 5.0, version 1.0 - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- SYMPTOMS ======== When attempting to run a regular (non-VBCE) project after working on Windows CE Toolkit for Visual Basic (VBCE) projects, the following error may 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. STATUS ====== Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. 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 --------------------------- 1. Open an existing VBCE project in Visual Basic. 2. Open a new standard EXE project, closing the VBCE project. 3. On the default Form1, add a CommandButton. 4. Add the following code to the CommandButton Click event procedure: MsgBox "OK" 5. 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. REFERENCES ========== Books Online for the Microsoft Windows CE Toolkit for Visual Basic 5.0 Additional query words: wce wince ====================================================================== Keywords : kbVBp500 kbIDE kbWinCE100 kbToolKit wce Version : WINDOWS:1.0,5.0 Platform : WINDOWS Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.