tags:

views:

14

answers:

1

I have implemented a custom wizard control in C# windows forms by creating a base form which has the shared components and then making child forms for each step of the process. I then have a class which hides/shows the child forms when you move from one step to another. The problem is that flickering is bad when moving between forms. Does anyone know a way to either keep this method and reduce the flicker or refactor it to make it use a single form (which should definitely reduce the flicker)?

A: 

I've always used a single form and a frame for this kind of wizard, though once I used a MDI Parent and some children. However, I don't think there's anything wrong with your method.

What's your current method of switching forms - do you do a .Show on the new form and then .Hide the old form, or the other way around? Is the "Next" button in your wizard doing anything else besides showing/hiding the relevant forms?

If you're flickering a lot, one guess is that your "Next" button is iterating through all the forms, setting them all to hidden and then the one you're interested in to visible, when all it needs to do it modify the visibility of the form you're leaving and the one you're going to.

Can you post some code samples of you Button_Click event code, so we can see exactly what it's doing that might be flickering?

rwmnau