By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,105 Members | 2,620 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,105 IT Pros & Developers. It's quick & easy.

Interesting flickering problem if application's user control is invalidated by external application (e.g. Notepad)

P: n/a
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

Apr 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

Apr 27 '06 #2

P: n/a
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

<sa********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
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

Apr 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.