Click here to Skip to main content
15,889,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff14-Oct-15 22:38
professionalBillWoodruff14-Oct-15 22:38 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:10
LeHuuTien14-Oct-15 23:10 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:13
mvePete O'Hanlon14-Oct-15 23:13 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:22
LeHuuTien14-Oct-15 23:22 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:42
mvePete O'Hanlon14-Oct-15 23:42 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:45
LeHuuTien14-Oct-15 23:45 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff15-Oct-15 8:24
professionalBillWoodruff15-Oct-15 8:24 
AnswerRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Gerry Schmitz15-Oct-15 9:38
mveGerry Schmitz15-Oct-15 9:38 
How many "cores" does your CPU have? Getting the most out of multi-threading (usually) requires multiple cores.

You want control 1 to be "stable" ... What about control 2?

If control 1 can be stable at the expense of control 2, then you could implement a "priority" system where control 1 is allowed to preempt control 2 (for drawing), but control 2 is not allowed to preempt control 1. There are various ways of blocking and testing for locks to accomplish this.

Be aware that "drawing" has always been a fairly slow operation relative to compute time (that's why it is not wise to update a "progress bar" too frequently when it comes to critical operations).

Also, 100ms is (usually) the limit at which a user can detect "lag" in a UI; you might consider raising the interval for control 1 to 200ms and checking the results.

And, since the interval of control 2 is a multiple of control 1, you might consider using a single timer, and "dispatching" control 2 once for every n times control 1 is dispatched; i.e. dispatch either control 1 or 2, but not so that both are running at the same time (when redrawing).

GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien15-Oct-15 16:36
LeHuuTien15-Oct-15 16:36 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Gerry Schmitz15-Oct-15 17:10
mveGerry Schmitz15-Oct-15 17:10 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien15-Oct-15 21:49
LeHuuTien15-Oct-15 21:49 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Gerry Schmitz16-Oct-15 8:21
mveGerry Schmitz16-Oct-15 8:21 
QuestionRead Records then Count Pin
macca2414-Oct-15 3:52
macca2414-Oct-15 3:52 
AnswerRe: Read Records then Count Pin
Richard MacCutchan14-Oct-15 5:01
mveRichard MacCutchan14-Oct-15 5:01 
AnswerRe: Read Records then Count Pin
Pete O'Hanlon14-Oct-15 5:09
mvePete O'Hanlon14-Oct-15 5:09 
SuggestionRe: Read Records then Count Pin
Richard Deeming14-Oct-15 5:24
mveRichard Deeming14-Oct-15 5:24 
GeneralRe: Read Records then Count Pin
Eddy Vluggen14-Oct-15 6:35
professionalEddy Vluggen14-Oct-15 6:35 
GeneralRe: Read Records then Count Pin
Pete O'Hanlon14-Oct-15 7:43
mvePete O'Hanlon14-Oct-15 7:43 
AnswerRe: Read Records then Count Pin
OriginalGriff14-Oct-15 5:16
mveOriginalGriff14-Oct-15 5:16 
SuggestionRe: Read Records then Count Pin
Matt T Heffron14-Oct-15 7:52
professionalMatt T Heffron14-Oct-15 7:52 
GeneralRe: Read Records then Count Pin
OriginalGriff14-Oct-15 8:02
mveOriginalGriff14-Oct-15 8:02 
GeneralRe: Read Records then Count Pin
macca2414-Oct-15 22:18
macca2414-Oct-15 22:18 
GeneralRe: Read Records then Count Pin
Agent__00714-Oct-15 22:56
professionalAgent__00714-Oct-15 22:56 
GeneralRe: Read Records then Count Pin
Richard Deeming15-Oct-15 2:43
mveRichard Deeming15-Oct-15 2:43 
GeneralRe: Read Records then Count Pin
Agent__00715-Oct-15 4:05
professionalAgent__00715-Oct-15 4:05 

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.