Interesting flickering problem if application's user control is invalidated by external application

S

sasifiqbal

Hi,

One of my developers are facing an interesting problem regarding
UserControl invalidation.
The problem is:

We have two forms in our application. Form A does nothing except
loading of Form B and Form B contains an array of UserButton kind of
contol (we have created our own buttons deriving from UserButton). All
the drawings activities in Form B are okay and nothing gets wrong if we
drag Form A over Form B. However if we move and Drag any external
application like Notepad over Form B we gets a very disturbing
flickering affect making all the userbutton controls to have a white
background for a sudden.

This sounds interesting as the dragging of same application's other
forms do not create the said flickering affect.

Please note that following code is inplace the control

this.SetStyle( ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.SupportsTransparentBackColor |
ControlStyles.DoubleBuffer | ControlStyles.Opaque, true
);


Can any one highlight what is going wrong here?

Regards,
Asif
 
S

sasifiqbal

I forgot to mention that this issue is only appear if we set "Show
Window Contents while dragging flag" to ON.

In my view i think it seems a bug in CLR which some how intercepts the
call in this particular case and let windows repainting the bakground.
 
F

Frank Hileman

Try removing SupportsTransparentBackColor and the DoubleBuffer flag; do
double buffering explicitly. I think the problem will go away.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top