C# child dialog paint/redraw issue

Jun 12 2009 4:04 PM

I am working with an SDK where when the user clicks button A in the owning application, my code fires and brings up a wizard (a .net form) that I built with .NET custom controls, standard controls, etc to the foreground.  The wizard works great with a big exception, if I move my dialog box (change its location) the dialog repaints in the new location, but the old dialog is still there.  Granted I am working on an old machine, but on a new machine as the dialog is moved it flickers across the screen.  Lastly, sometimes when I change one of the values in a comboBox that is located on the wizard form, the list remains dropped even after I made my selection.
 
What I know :
 
I know that my dialog is a child form and that when running the dialog outside of the application that I have hooked into via the SDK, the dialog works/looks
perfect.
 
I have tried all the online suggested material: DoubleBuffering, SuspendLayout()/ResumeLayout(), this.Refresh(), Invalidate(), WM_Paint, WndProc override, etc and nothing is working at all.  I guess I need some suggestions on what to do since I am not the owning application, I do not have access to the code of the owning application.
 
I know a repaint is happening and it appears that the message to WM_ERASEBACKGROUND is either not send or is not handled immediately.
 
I would really appreciate any suggested material or suggestions.  Thanks in advance.
 

Answers (1)