473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Best practices for creating a "wizard"

I'm wondering what the best practice is for creating a WinApp "wizard" that
contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design environment)

2) Create multiple WinForms (don't really know any pros or cons of this
method)

3) Use a tabbed page (although I don't want to see any tabs)

Any thoughts?

John
Aug 31 '06 #1
8 7451
Maybe Use Panels.

Pop a bunch of Panels overtop of eachother.
Right click on them and say "Bring to front" when in the design environment.

As ur wizard runs then you can visible = false and visible = true on them.

It would keep it all on one form for you.
Have one button outside of the Panel on the bottom that says "next"
and one that says "back"
show and hide them depending on what the person selects or which panel is
visible.

-Just a thought.
-But it would get around seeing "tabs".
-That would solve issue 1 cause u only have to hide and show 1 object.
Miro
"redeagle" <re******@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
I'm wondering what the best practice is for creating a WinApp "wizard"
that
contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design environment)

2) Create multiple WinForms (don't really know any pros or cons of this
method)

3) Use a tabbed page (although I don't want to see any tabs)

Any thoughts?

John

Aug 31 '06 #2
You can also use multiple Panel controls on a single Form, each a 'page' of
the wizard. Panels are shown/hidden as the user navigates the wizard.

--
Mike

Mike McIntyre [MVP]
http://www.getdotnetcode.com
"redeagle" <re******@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
I'm wondering what the best practice is for creating a WinApp "wizard"
that
contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design environment)

2) Create multiple WinForms (don't really know any pros or cons of this
method)

3) Use a tabbed page (although I don't want to see any tabs)

Any thoughts?

John

Aug 31 '06 #3
Hi John,

redeagle wrote:
I'm wondering what the best practice is for creating a WinApp
"wizard" that contains 4 or 5 "steps".
I spent a lot of time working on a good solution to this and settled on the
following:

Use a single form with a TabControl on it. This is far easier than multiple
forms. Using a TabControl allows you to organise each of your "pages" easily
without having to muck around with hidden and/or overlapping panels or
anything like that. You can set the Text property for each TabPage in order
to get the name to appear in the tab header at design time, making it much
easier to know which wizard page is which.

When your form opens, set the properties of the TabControl as follows:

\\\
TabControl.Appearance = TabAppearance.FlatButtons
TabControl.Multiline = False
TabControl.SizeMode = TabSizeMode.Fixed
TabControl.ItemSize = New Size(0, 1)
///

This will cause all of the tab imagery to disappear. The tabs themselves
will now be completely invisible.

However there is one final issue. Pressing Ctrl+Tab and Ctrl+Shift+Tab will
cycle back and forth through all the tabs in the TabControl -- not what you
want, I'm sure. You can resolve this by adding the following code to your
form:

\\\
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As
Boolean

'Prevent Ctrl+Tab or Ctrl+Shift+Tab from affecting the TabControl's
selected tab
If keyData = (Keys.Control Or Keys.Tab) OrElse keyData =
(Keys.Control Or Keys.Shift Or Keys.Tab) Then
'Indicate that we've handled this keypress
Return True
End If

Return MyBase.ProcessCmdKey(msg, keyData)

End Function
///

(That will probably wrap badly, sorry).

This will handle all Ctrl+Tab and Ctrl+Shift+Tab keypresses within the form
and will swallow them up without doing anything.

I've used this to create several wizard form and have found it to be a very
easy and flexible way of developing such a form.

Hope that helps,

--

(O)enone
Aug 31 '06 #4
Right on. Sounds like a good plan... I'll give that a whirl.

Thanks!

"Oenone" wrote:
Hi John,

redeagle wrote:
I'm wondering what the best practice is for creating a WinApp
"wizard" that contains 4 or 5 "steps".

I spent a lot of time working on a good solution to this and settled on the
following:

Use a single form with a TabControl on it. This is far easier than multiple
forms. Using a TabControl allows you to organise each of your "pages" easily
without having to muck around with hidden and/or overlapping panels or
anything like that. You can set the Text property for each TabPage in order
to get the name to appear in the tab header at design time, making it much
easier to know which wizard page is which.

When your form opens, set the properties of the TabControl as follows:

\\\
TabControl.Appearance = TabAppearance.FlatButtons
TabControl.Multiline = False
TabControl.SizeMode = TabSizeMode.Fixed
TabControl.ItemSize = New Size(0, 1)
///

This will cause all of the tab imagery to disappear. The tabs themselves
will now be completely invisible.

However there is one final issue. Pressing Ctrl+Tab and Ctrl+Shift+Tab will
cycle back and forth through all the tabs in the TabControl -- not what you
want, I'm sure. You can resolve this by adding the following code to your
form:

\\\
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As
Boolean

'Prevent Ctrl+Tab or Ctrl+Shift+Tab from affecting the TabControl's
selected tab
If keyData = (Keys.Control Or Keys.Tab) OrElse keyData =
(Keys.Control Or Keys.Shift Or Keys.Tab) Then
'Indicate that we've handled this keypress
Return True
End If

Return MyBase.ProcessCmdKey(msg, keyData)

End Function
///

(That will probably wrap badly, sorry).

This will handle all Ctrl+Tab and Ctrl+Shift+Tab keypresses within the form
and will swallow them up without doing anything.

I've used this to create several wizard form and have found it to be a very
easy and flexible way of developing such a form.

Hope that helps,

--

(O)enone
Aug 31 '06 #5
redeagle wrote:
>I'm wondering what the best practice is for creating a WinApp
"wizard" that contains 4 or 5 "steps".

I spent a lot of time working on a good solution to this and settled on
the following:
Thanks for the hint, I have an oncoming wizard project too :-)

-h-
Aug 31 '06 #6
If you take a look at my site you'll find source code for a PanelManager.
This was designed specifically for this purpose.
http://www.dotnetrix.co.uk/custom.html
....note that in VS2005 you will need to create a Control library containing
the PanelManager and use it via the dll, as there are bugs in the IDE which
cause the SelectedPanel property to lose reference to the Panels (after a
rebuild) when it's part of the same solution.

You'll also find an example showing how to create a customised TabControl
which allows you to turn the Tabs off.
http://www.dotnetrix.co.uk/tabcontrols.html

Another option you have is to use usercontrols and load them up at runtime.
This has the advantage that each usercontrol can be designed seperately.

There's also a several Wizard Controls on CodeProject.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"redeagle" <re******@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
I'm wondering what the best practice is for creating a WinApp "wizard"
that
contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design environment)

2) Create multiple WinForms (don't really know any pros or cons of this
method)

3) Use a tabbed page (although I don't want to see any tabs)

Any thoughts?

John

Aug 31 '06 #7
Hello redeagle,

Wizards are best created very carefully. The ingredients you use are critical
to the output. Should you choose to create a wizard using holly berries,
twigs, the blood of a wood elf, and the hair of a druid.. your wizard will
probably have an affinity for nature. These Hippy Wizards are a a bane on
society and should be avoided at all costs. Should you manage to create
a Hippy Wizard.. I'll be sure to visit hime, and you, with fireball in hand.

-Boo
I'm wondering what the best practice is for creating a WinApp "wizard"
that contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design
environment)

2) Create multiple WinForms (don't really know any pros or cons of
this method)

3) Use a tabbed page (although I don't want to see any tabs)

Any thoughts?

John

Sep 1 '06 #8
"redeagle" <re******@discussions.microsoft.comschrieb:
I'm wondering what the best practice is for creating a WinApp "wizard"
that
contains 4 or 5 "steps". Options so far are

1) Single WinForm making various controls visible/non visible at the
different steps(although that may get cluttered in the design environment)

2) Create multiple WinForms (don't really know any pros or cons of this
method)

3) Use a tabbed page (although I don't want to see any tabs)
The simplest solution is IMO to create usercontrols for the wizard pages.
However, there are other possible solutions too:

<URL:http://www.codeproject.com/cs/miscctrl/tswizard.asp>
<URL:http://www.codeproject.com/cs/miscctrl/ak_wizard.asp>
<URL:http://www.codeproject.com/cs/miscctrl/magicwizard.asp>
<URL:http://www.sellsbrothers.com/tools/genghis/>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Sep 1 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James | last post by:
Hello, I have about 15 master catalogs, or master tables, of information that my application uses. The data form wizard is fine because most of them have between 20 and 200 items in them. ...
1
by: Ralph Noble | last post by:
Any advice from the crowd? Every time I try to run "Copy Database Wizard" I get an error message saying I must be a member of the sysadmin group and have permission to copy files over the network....
12
by: Vlad de Mille IV | last post by:
Well, as the subject says.... Briefly, when I try to run *any* wizard, I get a simple dialog, stating "Permission Denied", to which I can only click "OK". I suspect this is a windows (XP)...
3
by: Joachim | last post by:
In the Install-Start-Welcome dialog - how can I change the text "Welcome to the MyApp Setup Wizard"? For instance, if I would like it to be in another language.
8
by: John E Katich | last post by:
When attempt to use the Event Wizard I get the following error message: "Add/Remove of the function impossible, because the parent class code is read only" The Project was convert from VC 6.0....
5
by: Geri Reshef | last post by:
In the VB6 I used the "Package & Deployment Wizard" to create an installation package. I didn't find the VB.Net equivalent. Does anybody knows where or what is it?
3
by: lorirobn | last post by:
Hi, Does anyone have any suggestions for this error... Everything on my db was working fine (famous last words, I know). And all of a sudden yesterday I started having an error regarding...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.