Click here to Skip to main content
16,011,702 members
Home / Discussions / C#
   

C#

 
GeneralSeperate Thread Crash when Right Click in Windows Task Bar Pin
Tristan Rhodes17-Mar-05 10:40
Tristan Rhodes17-Mar-05 10:40 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Heath Stewart17-Mar-05 14:38
protectorHeath Stewart17-Mar-05 14:38 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Tristan Rhodes17-Mar-05 23:56
Tristan Rhodes17-Mar-05 23:56 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Heath Stewart18-Mar-05 8:28
protectorHeath Stewart18-Mar-05 8:28 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Tristan Rhodes20-Mar-05 4:21
Tristan Rhodes20-Mar-05 4:21 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Heath Stewart20-Mar-05 6:08
protectorHeath Stewart20-Mar-05 6:08 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Tristan Rhodes20-Mar-05 10:00
Tristan Rhodes20-Mar-05 10:00 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Heath Stewart20-Mar-05 11:37
protectorHeath Stewart20-Mar-05 11:37 
When the application is idle or you ask the window manager to update the application, the invalidate region for the window for which painting is requested is redrawn (unless the application ignore the clipping region and redraws everything). This is key to having an efficient control: do not draw the whole thing.

Invalidate the region you need (perhaps the entire control; it depends on your requirements) and let the application update the window by placing the WM_PAINT message in the message queue. Set Thread.IsBackground to true and Thread.Priority to a lower priority so that your main application thread can concentrate on painting (or give it a higher priority).

At the very least, you must force the repaint in the right thread but shouldn't block by using Thread.Sleep because enough requests fast enough could mean that the message queue grows large and your visible graph won't match your in-memory graph.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Tristan Rhodes20-Mar-05 13:22
Tristan Rhodes20-Mar-05 13:22 
GeneralRe: Seperate Thread Crash when Right Click in Windows Task Bar Pin
Heath Stewart22-Mar-05 2:31
protectorHeath Stewart22-Mar-05 2:31 
GeneralNetwork programming Pin
felopater17-Mar-05 10:19
felopater17-Mar-05 10:19 
GeneralRe: Network programming Pin
Heath Stewart17-Mar-05 14:30
protectorHeath Stewart17-Mar-05 14:30 
GeneralRe: Network programming Pin
felopater18-Mar-05 10:52
felopater18-Mar-05 10:52 
GeneralRe: Network programming Pin
Heath Stewart18-Mar-05 20:06
protectorHeath Stewart18-Mar-05 20:06 
QuestionXMLSerializer and a collection of collections? Pin
Kasdoffe17-Mar-05 10:10
Kasdoffe17-Mar-05 10:10 
AnswerRe: XMLSerializer and a collection of collections? Pin
Kasdoffe17-Mar-05 10:13
Kasdoffe17-Mar-05 10:13 
GeneralCrystal Reports .NET Pin
SignMan35917-Mar-05 9:02
SignMan35917-Mar-05 9:02 
GeneralRe: Crystal Reports .NET Pin
Heath Stewart17-Mar-05 14:34
protectorHeath Stewart17-Mar-05 14:34 
GeneralProperty question Pin
thepersonof17-Mar-05 6:52
thepersonof17-Mar-05 6:52 
GeneralRe: Property question Pin
DavidNohejl17-Mar-05 7:08
DavidNohejl17-Mar-05 7:08 
GeneralRe: Property question Pin
Robert Rohde17-Mar-05 7:11
Robert Rohde17-Mar-05 7:11 
GeneralRe: Property question Pin
Nick Parker17-Mar-05 7:34
protectorNick Parker17-Mar-05 7:34 
GeneralRe: Property question Pin
J4amieC17-Mar-05 23:47
J4amieC17-Mar-05 23:47 
GeneralHexa Converting Pin
WaleedH17-Mar-05 5:48
WaleedH17-Mar-05 5:48 
GeneralRe: Hexa Converting Pin
techieboi17-Mar-05 6:14
techieboi17-Mar-05 6:14 

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.