Microsoft KB Archive/194927

= INFO: VB6 Enables Single Project Testing of Controls/Documents =

Article ID: 194927

Article Last Modified on 4/22/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q194927



SUMMARY
To create and test an ActiveX Control in Visual Basic 5.0, it was necessary to create two projects: one for the control and one to test it. Similarly, in order to test a UserDocument in Visual Basic 5.0, you had to run the document in the IDE, then start the Web browser and point the browser to the location of the temporary VBD file. This is no longer true in Visual Basic 6.0. Testing a UserControl or UserDocument inside the Visual Basic 6.0 IDE has become much simpler.



MORE INFORMATION
Steps to debug a UserControl within a single project:


 * 1) Create a new ActiveX Control project. UserControl1 is created by default.
 * 2) Start the project. When the dialog containing the Debugging tab is displayed, click OK. Your Web browser will start and the control will be activated inside the browser.

Steps to debug a UserDocument:

 Create an ActiveX Document DLL project. UserDocument1 is created by default. Add a CommandButton to the document.  Add the following code to the General Declarations section of UserDocument1: Option Explicit

Private Sub Command1_Click MsgBox "See, this really does work!!" End Sub

 Start the project. When the dialog containing the Debugging tab is displayed, click OK. Your Web browser will start and the UserDocument will be activated inside the browser. Click the CommandButton and the message box will appear.

