Displaying a Code Window

When an end user selects an object and clicks View Code, Visual Basic displays the default event procedure for the object. The end user can then write code in the procedure to attach to the object.

The SCodeNavigate service performs a similar operation. When the end user clicks on an object supplied by the visual designer, the designer can call this service to display the appropriate code window. 

Designers can use the SDesignerProgrammability service to ensure that identifiers and event names in user and designer code are valid in the Visual Basic environment.