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

.Net Wizard Control

By , 22 Jul 2007
 

Screenshot from visual studio designer

Screenshot - resim1.jpg

Screenshot from runtime form.

Screenshot from runtime form.

Introduction

Recently I decided to use Wizard Style user interface for my .Net project. Before implementing my own control I have searched the web. I found very useful controls. But most of them are very complex for that type user interface operation. Although I found most of them successful, decided to use none of them. Because most of this controls limits the way I design my own application. So I decided to write my own control. The control I create should give freedom for following clauses to developer

  • Developers may be able to design each wizard page visually.
  • Developers may be able to design, position, draw etc. next, previous and finish buttons.
  • Developers may be able to validate inputted data after each step.
  • Must be very easy to use.

In this article I will try to explain my aproach to Wizard Style user interface control which handles all these clauses. This control is built on Windows.Forms.Panel control.

A few years ago I have designed a software project. After having it worked for a few weeks, I have encoutered that collected data is not coming (to our servers) correct. In order to see what is wrong, I have worked with one of my end users. I have collected invaluable data after working with him. Also this action helped me to find the main reason of this mistake. The reason of mistake was fault of user interface. The data collected inside the form was very much, and this causes end user to make mistakes. If the user is not experienced computer user, the probability of making mistake increases rapidly. A little distraction might cause to input missing information. So that I have started to research a different way to receive input from users.

After research I have decided to use Wizard Style user interface. I broke information into pieces. In each step the application received input and validated it. That solved our problem. For this project I did use Visual Basic 6.0. It was not very easy to implement that type of user interface. By the way since then I am trying to use Wizard Style user interface in order to receive input if applicable.

Background

Using the code

We have two main functions on this control. A function for stepping next user interface and for stepping previous user interface. Also we have two main events. An event that user stepped next user interface, and an event for user stepped previous user interface.

We will use functions to let control navigate through user interfaces. We will use events to validate data that user inputted in each step. That's all simple.

I beleive the codes are very straight forward ;).

Please note that code is not thread safe

Points of Interest

History

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Yasin HINISLIOGLU
Software Developer
Turkey Turkey
Member
Yasin has more than 10 years of professional experience. He has several published articles includes graphics programming, robotics and application development in academic resources and national press. He is now working as a software developer for semi-governmental organization in Turkey.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberGun Gun Febrianza12 Aug '12 - 5:52 
assalamualaikum
this is excellent!! very interest to learning.
GeneralGood effortmemberNoahPhence22 Mar '09 - 23:59 
Great control and easy to use. Only thing that's truly "missing" is the ability to go to a specific page.
 
Thanks for sharing.
 
John
GeneralRe: Good effortmemberNoahPhence23 Mar '09 - 1:34 
Easy to put right though.
 
Public Property PageIndex()
Get
Return m_ActiveUIIndex
End Get
Set(ByVal value)
If m_UIPanels Is Nothing Then Return
 
If m_ActiveUIIndex >= m_UIPanels.Length Then m_ActiveUIIndex = m_UIPanels.Length - 1
 
m_ActiveUIIndex = value
m_ActiveUI = m_UIPanels(m_ActiveUIIndex)
m_ActiveUI.BringToFront()
 
End Set
End Property
 
John
GeneralThank youmembermatt higginbotham3 Jan '09 - 9:49 
Thanks for giving out your component. This wizard is great.. Very much appreciated. Well done.
 
-Matt
GeneralBeginner questionsmemberJohannekie30 Sep '08 - 21:33 
Hi,
 
The wizard and the code you gave lokks and is very simple to understand, thaks a lot. I just have one question.
 
How do you add and remove components (like putting in radio buttons and so on) on the follow-up steps. I can only see the first step in the design. What am I missing?
 
Thanks again
GeneralRe: Beginner questionsmemberYasin HINISLIOGLU30 Sep '08 - 23:40 
Each step is a panel. You can reorder panels in designer view. You can send back the first step in the designer view by right clicking on it.
GeneralRe: Beginner questionsmemberJohannekie1 Oct '08 - 1:32 
Thanks. When I started a new project I saw it on the wizard panel. Just one more thing.
 
I couldn't use the sample and modify it as I want to because I have to write a dll that is used as a plugin in another program. Anyway, I can't see where I'm supposed to put the wizard panel. I put one in and made it small and changed the color but now the code doesn't work. And I did everything the same as the sample.
 
Nothing happens when I click on the next button.
 
If it isn't too much trouble, would you please give me some steps just to get the program working.
 
Thanks
GeneralRe: Beginner questionsmemberYasin HINISLIOGLU1 Oct '08 - 1:49 
Have you noticed that there is UIPanels property of this control. You can add as many steps as you want using this property, using designer. If your wizard do not have any panel you cannot navigate through them. Make sure that you added as many steps as you need, using UIPanels property of wizard control.
 
You can use this control inside a dll. If you stuck so much do not hesitate to send me some code snippets, I can help you to solve your issue Wink | ;) .
GeneralRe: Beginner questionsmemberJohannekie1 Oct '08 - 3:16 
I'm adding a text file to a listview (in details view). Is there a way that the listview will be visible in the next two panels.
 
Thanks again for all your help.
GeneralRe: Beginner questionsmemberYasin HINISLIOGLU1 Oct '08 - 3:25 
It is not possible by default. You should make it manually if you want to see same listview in multiple panels. You can do it several ways. First you can create more than one listview for each panel. Secondly you can use OnPrevUI, OnNextUI events. You can add/remove listview to next/prev panel using these events. When user moves to prev ui you can remove listview from current panel and add it to prev panel programmatically.

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 22 Jul 2007
Article Copyright 2007 by Yasin HINISLIOGLU
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid