I have a large application with the complicated UI. The main form is filled
with the dockable custom controls. it works like this: custom controls
deriving from Panel was created and serves as a placeholders, regular panel
with some enhanced functionality. The user control consisting of regular .Net
controls (labels, buttons, datepickers) was created and dropped on the custom
Panel control.
The application was built with the .net 1.0. Currently, I'm upgrading the
application to run on the .Net 1.1. Everything is fine, but some of the
custom controls are not getting repainted at proper times
(minimize/maximize/another form over it, so on). Each control is designed as
a separate class, with the Invalidate() triggering OnPaint() method and the
proper repaint code in the overriden OnPaint(). Like I said, everything works
fine on the 1.0. Some additional info: not all of the controls are not
repainted. Another control (TabControl) that was also derived from Panel
refreshes just fine.
The code from the OnPaint() is rather long, that's why I'm not posting it.
But it works fine on the .net 1.0. The testing machine has the same
configuration (XP SP2). Please advise.
An additional piece of information. At one time, I used
Application.DoEvents() to repaint the invalidated area. Once I converted the
app into 1.1, the execution of the program alsways stopped during the
execution of the Application.DoEvents. Later I changed it to Refresh(0 and it
works fine now.
Thanks in advance,
Alex