Click here to Skip to main content
Click here to Skip to main content

GN Wizard Framework

, 21 Dec 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
A simple Wizard framework.


This article will help you give your application a common wizard interface. One of the main reasons wizards were invented was to make common tasks easier to work with.


The idea for my wizard came soon after I realized I was reproducing code to do the same thing again and again! As working with database applications is my main job, the need for wizard based procedures kept arising more and more. I felt the need to create a common wizard interface to suit my needs.


Just drop the WizardTemplate control on a form, and you are ready to go.


  • Add the control to the toolbox (GNWizardFrameWork.dll).
  • Drop the WizardTemplate on a WinForm.
  • Add the pages
  • You are done!

Points of interest

The wizard component is written in VB.NET and inherits from UserControl. Attached to the wizard is a 3DLine control.

Page Layouts

Wizards usually have two different page layouts, one for exterior pages (the main/welcome page), and one for interior pages (the individual steps within the first and last pages).

Exterior Pages

Exterior pages usually have a sidebar graphic with a boxed logo. The GNWizardFramework doesn't support this; instead, I have made the exterior page as a blank canvas so the developer can set the complete layout, and not be limited to having a sidebar they might not want.

Interior Pages

The interior pages are pretty much the same as the exterior pages except for a few minor alterations. Firstly, as exterior pages fill the whole wizard except for the button bar based at the bottom of the wizard, the interior pages have a header panel, and the working panel locations is compensated by a header.

PageStyle enum

  • eWPS_Interior

    The wizard and page should be formatted as an interior page.

  • eWPS_Exterior

    The wizard and page should be formatted as an exterior page.

How the code is brought together

The wizard consists of three classes and two controls:

Class/Control Description
WizardTemplateDesigner (class) Designer for the Wizard template
WizardPage (class) Wizard page item
WizardPageCollection (class) Holds all the WizardPage details, and handles all events passed by a WizardPage
WizardTemplate (control) Wizard control
ThreeDLine (control) Simple 3D line control

Handling buttons

All pages (interior and exterior) have their own button handlers. Buttons can be accessed by the page you want to change or set:

WelcomePage.HasNextButton = True
WelcomePage.HasPreviousButton = False
WelcomePage.HasCancelButton =True
WelcomePage.HasFinishButton = False

Main Features

  • Easy to use: Simple design-time interface.
  • GUI: An easy to use GUI, what you see at design-time is what you see at runtime.
  • PC Support: Works under (tested so far) Win95/98, WinXP, Win2000, and Win2003 Server

Other Features

  • Runtime customization: You can change any part of the wizard at runtime.
  • Attach/add pages at runtime:
    'Inserting a custom page At runtime:
    '-- Inserts A New Page after the Current Page
      WizardTemplate.Pages.IndexOf(CurrentWizPanel) + 1, _
    'Adding a custom page At runtime:
    '-- Adds A New Page To The End Of The wizard


Not much here to learn from, but hopefully the library will be of some use. As this is my first article, please be lenient. I hope all of you at least enjoyed reading the article, and maybe you'll find the framework useful.

Licence (LGPL)

The GNWizardFramework library is copyright 2005-2006 to Gary Noble, but its source code and the binaries are free for commercial and non commercial use.

Only vote for this article if you like the library.


  • 1.01 (21-Dec-2006)
    • Updated the 'Previous Button' disabled issue pointed out by Bill Reinhold (Thanks Bill).
    • Updated the 'Toolbox bitmap' - Toolbox bitmaps are now handled properly.
  • 1.0 (21-Mar-2006) - Initial release.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Gary Noble
Software Developer
United Kingdom United Kingdom
No Biography provided

Comments and Discussions

GeneralSet Focus of Next, Cancel and Finish Pinmemberjacodutoit5-Mar-08 21:46 
GeneralRe: Set Focus of Next, Cancel and Finish Pinmemberjacodutoit6-Mar-08 23:34 
GeneralOnMovePrevious, OnBeforeMoveNext Pinmemberemblabac15-Jan-08 5:58 
GeneralRe: OnMovePrevious, OnBeforeMoveNext PinmemberNiyazi Yarar18-Oct-11 11:54 
QuestionTrap button clicks? PinmemberAIroff23-Nov-07 0:18 
QuestionUsage Pinmemberstixoffire13-Nov-07 19:43 
AnswerRe: Usage PinmemberGary Noble13-Nov-07 23:17 
QuestionSpanish text for buttons (next, back, ...) Pinmemberamarino6-Oct-07 14:17 
QuestionEvent OnMovePrevious Pinmemberpatmorier2-Oct-07 0:49 
GeneralControls disappear when added to a Wizard Page PinmemberLonny Angell6-Aug-07 5:12 
GeneralRe: Controls disappear when added to a Wizard Page PinmemberMrPalermo1-Dec-07 14:53 
QuestionBest method to skip pages? PinmemberPhil Jeffrey1-Aug-07 18:32 
GeneralProblems when using DPI 120 PinmemberGeert van Horrik21-Jun-07 3:42 
GeneralRe: Problems when using DPI 120 PinmemberGary Noble21-Jun-07 5:45 
GeneralRe: Problems when using DPI 120 PinmemberGeert van Horrik21-Jun-07 5:52 

I have been investigating this problem more deeply. The problem is that the wizardpages are stretched over the buttons. So, I will now solve the problem by setting the size of the wizard pages automatically for 120 DPI. In that case, the background of the wizardpages will not be in front of the wizard buttons.

Best regards,


Need an advanced auto-update feature for your software? Try Updater!
Visit my website:

GeneralRe: Problems when using DPI 120 PinmemberGary Noble21-Jun-07 6:04 
GeneralRe: Problems when using DPI 120 PinmemberGeert van Horrik21-Jun-07 6:27 
GeneralRe: Problems when using DPI 120 PinmemberGary Noble21-Jun-07 6:48 
GeneralRe: Problems when using DPI 120 PinmemberGeert van Horrik21-Jun-07 6:50 
GeneralDesigner Bug Pinmemberdwpmartin19-Jan-07 7:51 
QuestionIs this a bug?? Pinmemberwreinhold20-Dec-06 10:42 
AnswerRe: Is this a bug?? PinmemberGary Noble20-Dec-06 23:07 
GeneralRe: Is this a bug?? Pinmemberwreinhold21-Dec-06 2:30 
QuestionAdd to toolbar problem [modified] Pinmemberwreinhold15-Dec-06 5:07 
QuestionWill this work with VS2005 Pinmemberchilling25-Nov-06 1:03 
AnswerRe: Will this work with VS2005 PinmemberGary Noble26-Nov-06 0:04 
GeneralRe: Will this work with VS2005 PinmemberBill960316-Apr-10 13:45 
GeneralCode and Additions Pinmembervaderjm28-Sep-06 8:22 
GeneralVS2005 Designer Error Pinmemberdisplaced8025-Aug-06 5:23 
AnswerRe: VS2005 Designer Error Pinmemberkmcbrearty10188-Sep-06 20:20 
QuestionOnMovePrevious? PinmemberScottGBR26-Jul-06 7:24 
QuestionLocalization PinmemberCh Fischer17-Jul-06 2:39 
GeneralRemove method looking strange PinmemberDylan Lyons5-Jul-06 0:16 
GeneralRe: Remove method looking strange [modified] PinmemberBobishKindaGuy25-Dec-06 13:12 
GeneralRe: Remove method looking strange PinmemberDavid Leckenby3-Sep-07 2:51 
QuestionChange wizardpages Pinmemberkoodiguru12-Jun-06 3:52 
GeneralRe: Change wizardpages PinmemberGary Noble12-Jun-06 23:48 
GeneralRe: Change wizardpages Pinmembernumlocked24-Jul-06 7:49 
AnswerRe: Change wizardpages PinmemberThe JZ14-Aug-06 10:22 
AnswerRe: Change wizardpages PinmemberRandom@Redgum20-Jun-07 15:31 
GeneralRe: Change wizardpages Pinmembersamccabe7-Sep-07 8:58 
GeneralCrash Pinmembercodepuncher30-May-06 17:06 
GeneralRe: Crash PinmemberGary Noble30-May-06 23:28 
GeneralRe: Crash Pinmembercodepuncher2-Jun-06 19:35 
GeneralRe: Crash Pinmembercodepuncher28-Jun-06 14:48 
GeneralRe: Crash Pinmemberdefiant7123-Nov-06 13:05 
GeneralRe: Crash Pinmembersimohack5-Mar-07 5:32 
GeneralRe: Crash Pinmembertrej12-Apr-07 1:57 
QuestionHaving trouble using wizard Pinmemberbryndabella30-May-06 9:08 
AnswerRe: Having trouble using wizard PinmemberGary Noble30-May-06 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150414.1 | Last Updated 21 Dec 2006
Article Copyright 2006 by Gary Noble
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid