Submitted by le0pard (not verified) on Tue, 2009-03-10 05:23.
Hey - very wonderful example, I used your code to create a setup wizard for my application. The only problem was, in order to do this it seems like I have to duplicate a LOT (if not all) of my existing form code. Do you know a way around this?
For instance, my wizard has 3 pages:
Set up Email Accounts
Set up Email Templates
Set up Search Criteria
In my actual application, I have 3 different forms, all programmed to gather this information (and logic too, to understand when text is input, do this, or if the form is filled out incorrectly throw an error, etc).
Using your wizard pages code, it seems that I cannot simply do something like:
(create a new wizard page for EmailAccounts) then in the 'SetActive' function, I can't simply "bring in" (Form emailForm = new EmailAccounts(), then emailForm.Load() or something) the existing code and functionality - I have to redo ALL of the code to get the same behavior I already have in my program.
Does my question make sense? Is there actually a way to do what I would like, and save me the hassle of duplicating the already existing work/functionality somehow? Feel free to e-mail me about this if you could, I'm not sure if I will get a notification when (and if) you reply.
How to reuse existing forms in a wizard?
For instance, my wizard has 3 pages:
Set up Email Accounts
Set up Email Templates
Set up Search Criteria
In my actual application, I have 3 different forms, all programmed to gather this information (and logic too, to understand when text is input, do this, or if the form is filled out incorrectly throw an error, etc).
Using your wizard pages code, it seems that I cannot simply do something like:
(create a new wizard page for EmailAccounts) then in the 'SetActive' function, I can't simply "bring in" (Form emailForm = new EmailAccounts(), then emailForm.Load() or something) the existing code and functionality - I have to redo ALL of the code to get the same behavior I already have in my program.
Does my question make sense? Is there actually a way to do what I would like, and save me the hassle of duplicating the already existing work/functionality somehow? Feel free to e-mail me about this if you could, I'm not sure if I will get a notification when (and if) you reply.
Thanks!