Click here to Skip to main content
15,903,030 members
Home / Discussions / C#
   

C#

 
GeneralChange the Properties.Settings.Default user Pin
Christopher Stratmann8-Jan-08 7:36
Christopher Stratmann8-Jan-08 7:36 
GeneralRe: Change the Properties.Settings.Default user Pin
Skippums8-Jan-08 7:42
Skippums8-Jan-08 7:42 
GeneralRe: Change the Properties.Settings.Default user Pin
Christopher Stratmann8-Jan-08 7:52
Christopher Stratmann8-Jan-08 7:52 
GeneralRe: Change the Properties.Settings.Default user Pin
Skippums8-Jan-08 8:14
Skippums8-Jan-08 8:14 
GeneralChanging colors of listview items.. Pin
Dio228-Jan-08 7:23
Dio228-Jan-08 7:23 
GeneralRe: Changing colors of listview items.. Pin
cola19738-Jan-08 8:41
cola19738-Jan-08 8:41 
GeneralThreading Advice/Solutions Pin
paul90388-Jan-08 6:11
paul90388-Jan-08 6:11 
GeneralRe: Threading Advice/Solutions Pin
led mike8-Jan-08 7:00
led mike8-Jan-08 7:00 
paul9038 wrote:
To stop the video I abort the thread and kill the seperate window

paul9038 wrote:
Is it possible to control threads where they can be stopped and restarted.


I imagine so. I have never implemented an approach that aborts threads since virtually all the documentation you read warns against aborting threads. You should use thread communications techniques to control the operations of the thread internally. The result is that the code executing in the thread has an alternate path that causes the thread procedure to return which ends the thread in a proper controlled fashion.

public static void ThreadProcedure(...)
{
  while ( IShouldContinuePlayingRecording() )
    PlayRecording();
}

So to cause a thread to end looks like this:

1) parent thread communicates with child thread telling it to end
2) child thread receives the message and alters it's flow of control resulting in the thread procedure returning.

is that what you were asking?



GeneralRe: Threading Advice/Solutions Pin
Patrick Etc.8-Jan-08 7:17
Patrick Etc.8-Jan-08 7:17 
QuestionHow to access click event of the controlbox item close 'X' of a form Pin
eoswin8-Jan-08 5:43
eoswin8-Jan-08 5:43 
GeneralRe: How to access click event of the controlbox item close 'X' of a form Pin
Not Active8-Jan-08 5:47
mentorNot Active8-Jan-08 5:47 
GeneralRe: How to access click event of the controlbox item close 'X' of a form Pin
eoswin8-Jan-08 10:55
eoswin8-Jan-08 10:55 
Question[Message Deleted] Pin
sven-it8-Jan-08 5:20
sven-it8-Jan-08 5:20 
GeneralRe: Problem with OpenFiledialog - C# CompactFramework Pin
Not Active8-Jan-08 5:48
mentorNot Active8-Jan-08 5:48 
GeneralWindow.status Bar Pin
A.Asif8-Jan-08 4:40
A.Asif8-Jan-08 4:40 
GeneralRe: Window.status Bar Pin
Judah Gabriel Himango8-Jan-08 6:06
sponsorJudah Gabriel Himango8-Jan-08 6:06 
GeneralRe: Window.status Bar Pin
A.Asif8-Jan-08 6:43
A.Asif8-Jan-08 6:43 
GeneralRe: Window.status Bar Pin
Judah Gabriel Himango8-Jan-08 8:29
sponsorJudah Gabriel Himango8-Jan-08 8:29 
GeneralRe: Window.status Bar Pin
A.Asif8-Jan-08 9:09
A.Asif8-Jan-08 9:09 
GeneralFrom VB6 to C# Pin
haolan8-Jan-08 4:07
haolan8-Jan-08 4:07 
GeneralRe: From VB6 to C# Pin
led mike8-Jan-08 4:57
led mike8-Jan-08 4:57 
GeneralRe: From VB6 to C# Pin
haolan9-Jan-08 0:10
haolan9-Jan-08 0:10 
GeneralRe: From VB6 to C# Pin
Ennis Ray Lynch, Jr.8-Jan-08 6:58
Ennis Ray Lynch, Jr.8-Jan-08 6:58 
GeneralRe: From VB6 to C# Pin
Paul Conrad8-Jan-08 17:30
professionalPaul Conrad8-Jan-08 17:30 
GeneralRe: From VB6 to C# Pin
ChandraRam9-Jan-08 1:00
ChandraRam9-Jan-08 1:00 

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.