The CircleDesigner sample is a simple designer that implements a single object containing both design-time and run-time designers.
Click to open or copy the CircleDesigner project files.
Click to open or copy the files for the Bin directory (required).
Click to open or copy the files for the Include directory (required).
The CircleDesigner uses these ActiveX designer features:
This designer has one property, HatchType, which changes the pattern used to draw circles on the designer surface. Added Circle subobjects have two properties, Name and Color, both of which can be set at either design time or run time.
To build the CircleDsgn sample
Using the Designer at Design Time:
Open a Standard EXE project, then select Components from the Project menu. Open the Designers tab and select Ax98 SDK Circle Sample to add the designer to the project. Then select Add Ax98 SDK Circle Sample on the Project menu to create an instance of the designer.
To add a new circle subobject, right-click the designer surface, then right-click an existing circle to delete it. If you select View\Object Browser for the designer object (CircleDsgrCtl1 class), you can watch as each addition and deletion is reflected in the designer's dynamic type information.
Click the left mouse button on a circle to select it and to display the Color and Name properties in the Properties window. Selected circles have black borders. Left-clicking outside any circle object in the designer selects the designer itself and displays its properties. You can edit the HatchType property in the properties window.
Double-click a circle or the designer to display the code window and the default event source handling method for the selected object.
Using the Designer at Run Time:
At run time, you cannot select, add, or delete a circle. You can access the circle subobjects and their respective Name and Color properties directly through the run-time type information, which is static. When you click a circle, the designer fires the OnObjectClicked event and the circle fires its OnAction event. These event sinks are not hooked up for the circle objects until you click the circle or access its type information.
Sample Client Project
The VB_CircleDsgnSamp project in the VBSamples directory is a sample Visual Basic client program for the CircleDesigner sample. To use this project in Visual Basic, create a standard EXE project. On the File menu, click Open Project, then navigate to the VB_Samples\VB_CircleDsgnSamp directory. Select CircDsgnSamp.vbp to load the project files into the Visual Basic environment.