Click here to Skip to main content
15,921,210 members
Home / Discussions / C#
   

C#

 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
Mike Novy8-Nov-06 5:48
Mike Novy8-Nov-06 5:48 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
vineas8-Nov-06 6:49
vineas8-Nov-06 6:49 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); [modified] Pin
Mike Novy8-Nov-06 7:44
Mike Novy8-Nov-06 7:44 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
vineas8-Nov-06 8:06
vineas8-Nov-06 8:06 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
Mike Novy8-Nov-06 8:46
Mike Novy8-Nov-06 8:46 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
vineas8-Nov-06 9:20
vineas8-Nov-06 9:20 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
Mike Novy8-Nov-06 9:52
Mike Novy8-Nov-06 9:52 
GeneralRe: High CPU load caused by this.Invalidate(myRegion); Pin
vineas8-Nov-06 10:46
vineas8-Nov-06 10:46 
OK, that makes more sense now. Similar to how I thought it was originally, but not quite. The way you describe it, I don't see how it would work directly - plus invalidating a quarter of each gauge will end up creating a clip rectangle that covers most of the form (since each invalidated region gets added together to create a single rectangle).

However, you could probably still make it work with a bit more work on your part. Instead of drawing them all in the form's paint event, create a user control that encapsulates a single gauge. This will probably be a bit better anyway, as it could better handle some requirements changes (ie - what happens when the user decides that one of the gauges isn't important and wants it removed, or wants to add more, or even wants to adjust it dymanically).

The same concept applies to user controls as it does to forms - the paint event gets the same arguments and can be used in the same way. And once you have it narrowed down to a single gauge, then you're back to where we were, and you can begin to look at the clip region again to minimize drawing.

-----
In the land of the blind, the one eyed man is king.

Questionhow to get a date format mm.dd.yyyy( e.g. 12.31.2006) Pin
yogita charhate8-Nov-06 0:36
yogita charhate8-Nov-06 0:36 
AnswerRe: how to get a date format mm.dd.yyyy( e.g. 12.31.2006) Pin
Colin Angus Mackay8-Nov-06 0:44
Colin Angus Mackay8-Nov-06 0:44 
GeneralRe: how to get a date format mm.dd.yyyy( e.g. 12.31.2006) Pin
yogita charhate8-Nov-06 1:27
yogita charhate8-Nov-06 1:27 
QuestionHow Create Nonrectangular form in c#.net 2005 Pin
mohammadSoft8-Nov-06 0:30
mohammadSoft8-Nov-06 0:30 
AnswerRe: How Create Nonrectangular form in c#.net 2005 Pin
c_onica8-Nov-06 2:14
c_onica8-Nov-06 2:14 
QuestionHow to access from objects from other class Pin
signimage8-Nov-06 0:26
signimage8-Nov-06 0:26 
AnswerRe: How to access from objects from other class Pin
Colin Angus Mackay8-Nov-06 0:42
Colin Angus Mackay8-Nov-06 0:42 
AnswerRe: How to access from objects from other class Pin
quiteSmart8-Nov-06 0:56
quiteSmart8-Nov-06 0:56 
AnswerRe: How to access from objects from other class Pin
Mairaaj Khan8-Nov-06 1:07
professionalMairaaj Khan8-Nov-06 1:07 
AnswerRe: How to access from objects from other class Pin
mohammadSoft8-Nov-06 1:38
mohammadSoft8-Nov-06 1:38 
Questionhow to use TableAdapter in VC# 2005 ? Pin
hdv2128-Nov-06 0:26
hdv2128-Nov-06 0:26 
AnswerRe: how to use TableAdapter in VC# 2005 ? Pin
quiteSmart8-Nov-06 1:02
quiteSmart8-Nov-06 1:02 
Questionhow to convert char[] to byte[] without loss of data Pin
Hemant kulkarni7-Nov-06 23:52
Hemant kulkarni7-Nov-06 23:52 
AnswerRe: how to convert char[] to byte[] without loss of data Pin
ThatsAlok8-Nov-06 0:01
ThatsAlok8-Nov-06 0:01 
AnswerRe: how to convert char[] to byte[] without loss of data Pin
stancrm8-Nov-06 0:35
stancrm8-Nov-06 0:35 
AnswerRe: how to convert char[] to byte[] without loss of data Pin
Guffa8-Nov-06 2:35
Guffa8-Nov-06 2:35 
GeneralIPaddress control Pin
ThatsAlok7-Nov-06 23:48
ThatsAlok7-Nov-06 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.