Skip to content

C# child dialog paint/redraw issue

mkoleno346

Asked Jun 12, 2009, 12:04 PM EDT1 answer
Share
LinkedInX
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.
 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi, I am facing a similar issue with application. I am opening a child form, first time i open it in normal mode, I maximize this window and try to open the another form however when new form is opened it automatically resizes the previous form and when this happens previous form leaves it artifacts at earlier location and does not redraw itself.
    Thanks for any help !!!
     
     
     
    0