Search Forum
(53671 Postings)
Search Site/Articles

Archived Articles
712 Articles

C# Books
C# Consultants
What Is C#?
Download Compiler
Code Archive
Archived Articles
Advertise
Contribute
C# Jobs
Beginners Tutorial
C# Contractors
C# Consulting
Links
C# Manual
Contact Us
Legal

GoDiagram for .NET from Northwoods Software www.nwoods.com


 
Printable Version

Wizardry With "Wizards"
By Kamran Shakil

This article discusses the General Principle of Creating a "Wizard" in Visual Studio.NET IDE

Wizards are a type of application that lead a user step-by-step through a series of actions to accomplish a complex or difficult task and, once completed, goes away. Wizards are created using the IDTWizard interface and have only one method, Execute, which contains the code you want the Wizard to run. A Wizard can be programmed to create a fully-working application for the user, or a skeletal application that the user needs to add additional code to for it work correctly, such as with the Add-In Wizard.

Wizards can be constructed to appear any way you like. They consist of one or more panels, or frames. Panels can contain a descriptive image, usually on the left side, a label description, usually to the right of the image that may also contain instructions, and an area near the bottom in which controls can be placed. Navigation controls, such as Next and Previous, appear at the bottom of the panel.

The Wizard, when completed, is available as a template in the Add Project and Add Item dialog boxes.

Procedure :
1.Create a new DLL project. 

2.In the class module, implement the IDTWizard interface. 

 Implements IDTWizard

3.Add the code you want to the Execute procedure. 

4.Compile the project. 

 This creates a COM+ DLL. 

5.Create a VSZ file for the Wizard. This allows the Wizard to appear 
  in the Add Project or Add Item dialog boxes. 
If interested , you can create a VSDIR file for the Wizard. This displays as a description for the Wizard in the Add Project or Add Item dialog boxes, and allows you to specify an icon and arrange its location in the list

To display a custom icon for the new wizard, either specify a path to the icon (.ICO) file in the VSDir file or place an icon file in the same directory as the wizard file with the same base filename as the VSZ file, only with an .ICO extension. For example, if the Wizard is called MyWizard.dll, name the .ICO file MyWizard.ico.