Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
GeneralRe: WinForms Plot Pin
Ista8-Aug-03 6:19
Ista8-Aug-03 6:19 
GeneralRe: WinForms Plot Pin
Ikke8-Aug-03 6:50
Ikke8-Aug-03 6:50 
GeneralRe: WinForms Plot Pin
Ista8-Aug-03 9:32
Ista8-Aug-03 9:32 
Generalversioning problem Pin
devvvy7-Aug-03 22:57
devvvy7-Aug-03 22:57 
GeneralThread doesn't start with VS .NET 2003 Pin
MeisterBiber7-Aug-03 21:52
MeisterBiber7-Aug-03 21:52 
GeneralRe: Thread doesn't start with VS .NET 2003 Pin
Rein Hillmann8-Aug-03 5:38
Rein Hillmann8-Aug-03 5:38 
GeneralMulti-Threaded Programming Pin
monrobot137-Aug-03 17:12
monrobot137-Aug-03 17:12 
GeneralRe: Multi-Threaded Programming Pin
J. Dunlap7-Aug-03 17:35
J. Dunlap7-Aug-03 17:35 
If you can, keep have a variable that indicates whether or not to stop the operation, and keep checking that variable in the worker thread. But this is obviously not always possible. The other way to do it is to call Thread.Abort() on the worker thread. When you call Thread.Abort, the thread will get a ThreadAbortException. Handle the exception, and clean up any resources and close any connections before exiting.

// in method called by worker thread
try
{
  //do work that might take a while
}catch(Exception e)
{
  // * clean up resources
  // * if the exception is a ThreadAbortException, exit gracefully
}



"Blessed are the peacemakers, for they shall be called sons of God." - Jesus

"You must be the change you wish to see in the world." - Mahatma Gandhi







GeneralRe: Multi-Threaded Programming Pin
monrobot138-Aug-03 3:15
monrobot138-Aug-03 3:15 
GeneralRe: Multi-Threaded Programming Pin
J. Dunlap8-Aug-03 9:49
J. Dunlap8-Aug-03 9:49 
GeneralBitBlt performance in C# Pin
CyberKewl7-Aug-03 16:52
CyberKewl7-Aug-03 16:52 
GeneralRe: BitBlt performance in C# Pin
J. Dunlap7-Aug-03 17:45
J. Dunlap7-Aug-03 17:45 
GeneralRe: BitBlt performance in C# Pin
CyberKewl7-Aug-03 21:21
CyberKewl7-Aug-03 21:21 
GeneralRe: BitBlt performance in C# Pin
Ista8-Aug-03 6:26
Ista8-Aug-03 6:26 
GeneralChanging a form's title Pin
eggie57-Aug-03 15:17
eggie57-Aug-03 15:17 
GeneralRe: Changing a form's title Pin
J. Dunlap7-Aug-03 15:20
J. Dunlap7-Aug-03 15:20 
GeneralRe: Changing a form's title Pin
eggie57-Aug-03 15:30
eggie57-Aug-03 15:30 
GeneralRe: Changing a form's title Pin
Rein Hillmann7-Aug-03 21:11
Rein Hillmann7-Aug-03 21:11 
GeneralRe: Changing a form's title Pin
freshthinking8-Aug-03 0:07
freshthinking8-Aug-03 0:07 
GeneralColor or Colour Pin
totig7-Aug-03 12:23
totig7-Aug-03 12:23 
GeneralRe: Color or Colour Pin
J. Dunlap7-Aug-03 12:51
J. Dunlap7-Aug-03 12:51 
GeneralHandle mouse move events in C# Pin
sumeat7-Aug-03 9:20
sumeat7-Aug-03 9:20 
GeneralRe: Handle mouse move events in C# Pin
Nnamdi Onyeyiri7-Aug-03 11:10
Nnamdi Onyeyiri7-Aug-03 11:10 
GeneralRe: Handle mouse move events in C# Pin
sumeat7-Aug-03 11:42
sumeat7-Aug-03 11:42 
GeneralRe: Handle mouse move events in C# Pin
Ista7-Aug-03 16:08
Ista7-Aug-03 16:08 

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.