Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing the paper size at run time Pin
Mazdak30-Dec-03 6:26
Mazdak30-Dec-03 6:26 
Generalinterop - array of structs with embedded strings Pin
lavinder29-Dec-03 17:45
lavinder29-Dec-03 17:45 
GeneralRe: interop - array of structs with embedded strings Pin
Heath Stewart30-Dec-03 5:26
protectorHeath Stewart30-Dec-03 5:26 
Generalserial por comunications Pin
pedropj29-Dec-03 17:00
pedropj29-Dec-03 17:00 
GeneralRe: serial por comunications Pin
Heath Stewart30-Dec-03 5:16
protectorHeath Stewart30-Dec-03 5:16 
GeneralNavigation in multiple forms Pin
Hayat29-Dec-03 16:51
Hayat29-Dec-03 16:51 
GeneralRe: Navigation in multiple forms Pin
Mehdi Moshtaghi30-Dec-03 0:37
Mehdi Moshtaghi30-Dec-03 0:37 
GeneralRe: Navigation in multiple forms Pin
Heath Stewart30-Dec-03 5:10
protectorHeath Stewart30-Dec-03 5:10 
Perhaps a better way is to take a lesson from the way property pages work within a property sheet in Windows (and a lot of other implementations I've seen): instead of using multiple forms, use one form with the Previous and Next buttons (or whatever you want to call them), along with a collection of user controls that represent the property pages. You can code the logic in the form to add and remove the controls when you click the Previous or Next buttons by adding and removing them from the container (perhaps use a Panel above the buttons). The buttons could also be disabled or hidden when you reach the beginning or the end of the collection of pages.

There's many ways to evolve this method, but it's pretty much done the same way in Windows. If you've done any Win32 programming, take a look at the documentation for the IPropertyPage interface. There's links to other helpful documentation in there. You could use a similar mechanism where the controls you will host must implement a similar interface in order for them to communicate with the property sheet (same goes for a Wizard, actually, like you're doing), or for the property sheet to abstractly communicate with them (through this IPropertyPage-like interface) without knowing specific types.

There should be several articles here on CP that outline this approach. Just search for "wizard" or "property pages" or something like that. You could also try google to find some examples.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Navigation in multiple forms Pin
Hayat31-Dec-03 16:12
Hayat31-Dec-03 16:12 
GeneralRe: Navigation in multiple forms Pin
Mehdi Moshtaghi31-Dec-03 21:52
Mehdi Moshtaghi31-Dec-03 21:52 
GeneralThis is probably a silly question, Pin
Nick Seng29-Dec-03 16:41
Nick Seng29-Dec-03 16:41 
GeneralCut, Copy, Paste Event needed. Pin
Nicholas Cardi29-Dec-03 12:00
Nicholas Cardi29-Dec-03 12:00 
GeneralRe: Cut, Copy, Paste Event needed. Pin
je_gonzalez29-Dec-03 13:33
je_gonzalez29-Dec-03 13:33 
GeneralRe: Cut, Copy, Paste Event needed. Pin
Heath Stewart30-Dec-03 5:03
protectorHeath Stewart30-Dec-03 5:03 
GeneralRe: Cut, Copy, Paste Event needed. Pin
panache102319-Jan-04 11:35
panache102319-Jan-04 11:35 
GeneralInstalled Applications Pin
Melanius29-Dec-03 10:36
Melanius29-Dec-03 10:36 
GeneralRe: Installed Applications Pin
Heath Stewart29-Dec-03 11:16
protectorHeath Stewart29-Dec-03 11:16 
GeneralModeless Dialog Box Pin
JL_32729-Dec-03 9:52
JL_32729-Dec-03 9:52 
GeneralRe: Modeless Dialog Box Pin
Heath Stewart29-Dec-03 11:11
protectorHeath Stewart29-Dec-03 11:11 
GeneralRe: Modeless Dialog Box Pin
je_gonzalez29-Dec-03 11:37
je_gonzalez29-Dec-03 11:37 
QuestionNumericUpDown with XP/System theme, possible? Pin
Roriok29-Dec-03 9:05
Roriok29-Dec-03 9:05 
AnswerRe: NumericUpDown with XP/System theme, possible? Pin
Roger Alsing29-Dec-03 9:11
Roger Alsing29-Dec-03 9:11 
GeneralRe: NumericUpDown with XP/System theme, possible? Pin
Heath Stewart29-Dec-03 9:39
protectorHeath Stewart29-Dec-03 9:39 
GeneralRe: NumericUpDown with XP/System theme, possible? Pin
Roriok29-Dec-03 9:42
Roriok29-Dec-03 9:42 
Generaltaskbar Pin
hebzzz29-Dec-03 7:54
hebzzz29-Dec-03 7:54 

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

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