Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
General[C#.net] Connection on data base sqlserver Pin
abbd8-Jan-08 8:32
abbd8-Jan-08 8:32 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
J4amieC8-Jan-08 8:58
J4amieC8-Jan-08 8:58 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Colin Angus Mackay8-Jan-08 9:06
Colin Angus Mackay8-Jan-08 9:06 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Ennis Ray Lynch, Jr.8-Jan-08 9:29
Ennis Ray Lynch, Jr.8-Jan-08 9:29 
Question.axpx+javascript ? Pin
simworld8-Jan-08 8:24
simworld8-Jan-08 8:24 
AnswerRe: .axpx+javascript ? Pin
Christian Graus8-Jan-08 9:13
protectorChristian Graus8-Jan-08 9:13 
AnswerRe: .axpx+javascript ? Pin
Ennis Ray Lynch, Jr.8-Jan-08 9:32
Ennis Ray Lynch, Jr.8-Jan-08 9:32 
GeneralCustom Xml Serialization Pin
Skippums8-Jan-08 8:09
Skippums8-Jan-08 8:09 
GeneralRe: Custom Xml Serialization Pin
Ennis Ray Lynch, Jr.8-Jan-08 8:39
Ennis Ray Lynch, Jr.8-Jan-08 8:39 
QuestionRe: Custom Xml Serialization Pin
Skippums8-Jan-08 10:07
Skippums8-Jan-08 10:07 
GeneralRe: Custom Xml Serialization Pin
Ennis Ray Lynch, Jr.8-Jan-08 10:12
Ennis Ray Lynch, Jr.8-Jan-08 10:12 
QuestionRe: Custom Xml Serialization Pin
Skippums8-Jan-08 10:33
Skippums8-Jan-08 10:33 
GeneralRe: Custom Xml Serialization Pin
Ennis Ray Lynch, Jr.8-Jan-08 10:35
Ennis Ray Lynch, Jr.8-Jan-08 10:35 
GeneralRe: Custom Xml Serialization Pin
Skippums8-Jan-08 10:48
Skippums8-Jan-08 10:48 
GeneralInteresting Pin
Ennis Ray Lynch, Jr.8-Jan-08 11:01
Ennis Ray Lynch, Jr.8-Jan-08 11:01 
GeneralRe: Interesting Pin
Skippums9-Jan-08 5:12
Skippums9-Jan-08 5:12 
QuestionCreate Axwebbrowser with new Tabpage (VS2005) Pin
cola19738-Jan-08 8:00
cola19738-Jan-08 8:00 
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?



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.