all groups > dotnet windows forms > january 2006 >
You're in the

dotnet windows forms

group:

Repainting Problem


Repainting Problem Dino Buljubasic
1/13/2006 7:31:46 PM
dotnet windows forms: HI,

I am having my user control on my form. My user control hosts a
custom build panel that gets dynamically loaded with ListView controls
when form is opened, maximized, resized.

ListViewItems of each Listview have their ForeColor properties
set to different colors and fonts.

All this works just fine. The problem occurs when I drag
another window (say I open Calculator and drag it over my form).

The problem is that when I drag the Calculator window (or any
other window) over my form, each ListViewItem ForeColor and Font does
not repaint properly (not every time).

It looks like it takes over the ForeColor and Font property of
my panel that hosts these ListViews. As I drag the other window over
my form, the Font and ForeColor of my ListViewItems get repainted
sometimes right way, sometimes not.

Also, if I drag another window over my form slowly, repainting
happens the right way.


How can I fix this?

Any holp will be appreciated,
_dino_
Re: Repainting Problem Bob Powell [MVP]
1/18/2006 10:00:14 AM
Are you doing the repainting correctly?

Have you read the #1 GDI+ FAQ problem?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.



[quoted text, click to view]

Re: Repainting Problem Dino Buljubasic
1/18/2006 6:41:34 PM
.... ???
I guess not

On Wed, 18 Jan 2006 10:00:14 +0100, "Bob Powell [MVP]"
[quoted text, click to view]
Re: Repainting Problem Dino Buljubasic
1/23/2006 8:39:59 PM

For those interested, I have found out that this is rather an IDE
issue than coding issue. When I run my application from IDE, this
repainting problem occurs, when I run it from compiled .exe, the
problem is gone.

_dino_


On Fri, 13 Jan 2006 19:31:46 GMT, Dino Buljubasic
[quoted text, click to view]
AddThis Social Bookmark Button