home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 December / WIN95_DEC_1996_2.ISO / htmlmisc / vb5ccein.exe / RCDATA / CABINET / ctrlwiz.dll / 1033 / TEXT / TXTSUMMARY < prev   
Text File  |  1996-10-25  |  3KB  |  38 lines

  1. Below is a To Do list of items required to complete the testing and debugging of your UserControl.
  2.  
  3. A) Create a test program for your UserControl
  4.  
  5. There are two ways to set up a test program for your UserControl, depending on whether you inserted the control in a Standard EXE, or created an ActiveX Control project for it.
  6.  
  7. If you created an ActiveX Control project, the following steps will set up a test program:
  8.  
  9. 1)  Save your UserControl.
  10. 2)  Close your UserControl's designer, to put the control in run mode.
  11. 3)  If you haven't already created a test project, add a Standard EXE project by selecting Add Project from the File menu.
  12. 4)  In the Toolbox, double-click your UserControl's icon to place an instance of your UserControl on Form1, in the Standard EXE project.  You can move and resize the control as needed.
  13. 5)  Save the project group. In later development and test sessions, you can open both projects at once by opening the project group. 
  14.  
  15. If you inserted the UserControl in an existing Standard EXE project, follow these steps:
  16.  
  17. 1)  Save your UserControl.
  18. 2)  Close your UserControl's designer, to put the control in run mode.
  19. 3)  In the Project window, double-click Form1 in the Standard EXE project, to open its designer.
  20. 4)  In the Toolbox, double-click your UserControl's icon to place an instance of your UserControl on Form1.  You can move and resize the control as needed.
  21.  
  22. B) Test your control's behavior at design time, and at run time.
  23.  
  24. 1)  Select the control you placed on Form1 in the test project, and press F4 to open the Properties window. Verify that you can see and change the properties you added to your control.
  25. 2)  Close Form1 and reopen it, and verify that the property values for your control were correctly saved and retrieved.
  26. 3)  Double-click the control you placed on Form1, and verify that the appropriate events appear in the right-hand (Procedure) drop down of the code window.
  27. 4)  Add test code to the event procedures for your control.
  28. 5)  Add other controls, and put code in their event procedures to test the run-time behavior of your control's properties and methods.
  29. 6)  Press F5 to run the test project, and test your control's run-time behavior.
  30.  
  31. You can modify your control by running the Wizard again, and selecting your UserControl.
  32.  
  33. Use the Property Page Wizard to create Property Pages for your UserControls.
  34.  
  35. For more information on creating and testing ActiveX Controls, please read Chapter 4, "Creating an ActiveX Control," and Chapter 9, "Building ActiveX Controls."
  36.  
  37. Chapter 6, "General Principles of Component Design," and Chapter 7, "Debugging, Testing, and Deploying ActiveX Components," contain additional information you may find useful.