Programming Components with Microsoft Visual Basic 6.0
Creating
ActiveX Controls
- Choose Save Project from the File menu. Save the files as LIFE.CTL, LIFE.FRM, and LIFE.VBP. Note that you must save a project with a control before you can run the project.
- Choose Start from the Run menu. Notice the events fired:
Terminate
Initialize
Resize 1524, 1284
ReadProperties
Show
- Choose End from the Run menu. Notice the events fired:
Initialize
Resize 1524, 1284
ReadProperties
Show
- When the message boxes become too annoying (they probably have already), go back into the UserControl designer’s Code window and replace all the MsgBox statements with Debug.Print, which will direct all output to the Immediate window. Close the UserControl designer when you’ve finished.
- Close the Form1 Form window. Notice the event fired in the Immediate window.
Terminate
- In the Project window, double-click Form1 to open the Form window again. Notice the event fired in the Immediate window.
Initialize
Resize 1764, 1164
ReadProperties
Show
- Right-click on Form1’s background (not on UserControl1), and select Update UserControls. Notice the string of events in the Immediate window.
next page....
|
|