Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2006

Tip: Looking for answers? Try searching our database.

Improving Control Painting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ChrisB - 17 Jan 2006 00:47 GMT
Hi all, I've got some performance issuses with the GDI+ drawing of my
Controls.

I've got a panel in which I'm creating quite a few objects (50-100) that
derive from Control, and that override the OnPaint event. Its very simple
drawing at the moment, just painting 2 solid filled squares. My issue is
that when I start dragging one over the top of the rest of them, its leaving
trails over them for quite some time before the controls underneath repaint
them selves.

Here is my painting code:

I am hoping to add some nicer graphics drawing later, but
Rene - 19 Jan 2006 01:19 GMT
Something to be aware of is that doing any painting (and other things) while
running your app on VS 2005 will have horrid performance, horrid meaning far
below what you would normally expect. You may want to compile and run the
project directly by clicking the exe to test to see if you still have the
problem.

> Hi all, I've got some performance issuses with the GDI+ drawing of my
> Controls.
[quoted text clipped - 9 lines]
>
> I am hoping to add some nicer graphics drawing later, but
ChrisB - 19 Jan 2006 01:37 GMT
My god?!

Thanks for that tip, I was getting really quite worried that I might have to
resort to redesigning my drag and drop functionality. I'm amazed at the
performance gain, and at the same time kicking my self, cus I shouldn't be
:)

Thanks,
ChrisB.

> Something to be aware of is that doing any painting (and other things)
> while running your app on VS 2005 will have horrid performance, horrid
[quoted text clipped - 15 lines]
>>
>> I am hoping to add some nicer graphics drawing later, but
Rene - 19 Jan 2006 02:11 GMT
Tell me about it, when we upgraded our app from 2003 to 2005 and tested our
custom graph controls I freaked out because they were so slow, we also had a
major problem with data object where the DataReader would take about 30
longer to run than what it used to be in VS 2003. After spending hours
tracking the cause of the porblem and unable to find it, I decided to try to
run the program directly by clicking on the exe and was relief to see the
problems go away!

I wonder what is going on with VS 2005 IDE to have such a performance hit
when running the app from there.VS 2003 did not have such a drastic change.

> My god?!
>
[quoted text clipped - 25 lines]
>>>
>>> I am hoping to add some nicer graphics drawing later, but
ChrisB - 19 Jan 2006 03:56 GMT
I'm also using VS8 Just this morning I've been wondering about the
performance of my DataReaders, I've just run my application directly and it
cuts the load time down (mostly database interactions) from 1.3 seconds to
0.9 seconds, doesn't sound like much, but its quite noticeable!

So that solves the problem for the release app, but it doesn't help when I'm
showing the boss how it works through the IDE have him tell me its
unacceptably slow!!!  At least I've got an answer for him now :)

I'm guessing that with all the new edit and continue and other new debugging
features, VS8 is doing a lot more in the background than before slowing
things down?

> Tell me about it, when we upgraded our app from 2003 to 2005 and tested
> our custom graph controls I freaked out because they were so slow, we also
[quoted text clipped - 37 lines]
>>>>
>>>> I am hoping to add some nicer graphics drawing later, but

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.