Click here to Skip to main content
16,015,991 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Browser Back Button recognition. Pin
leppie27-May-08 1:51
leppie27-May-08 1:51 
GeneralRe: C# Browser Back Button recognition. Pin
imnotso#27-May-08 2:19
imnotso#27-May-08 2:19 
AnswerRe: C# Browser Back Button recognition. Pin
GuyThiebaut27-May-08 2:31
professionalGuyThiebaut27-May-08 2:31 
GeneralRe: C# Browser Back Button recognition. Pin
imnotso#27-May-08 2:34
imnotso#27-May-08 2:34 
AnswerRe: C# Browser Back Button recognition. Pin
The Nightcoder27-May-08 13:16
The Nightcoder27-May-08 13:16 
AnswerRe: C# Browser Back Button recognition. Pin
neelchauhan28-May-08 2:22
neelchauhan28-May-08 2:22 
GeneralRe: C# Browser Back Button recognition. Pin
imnotso#28-May-08 2:46
imnotso#28-May-08 2:46 
QuestionThread abortion before closing form Pin
DeepOceans27-May-08 0:34
DeepOceans27-May-08 0:34 
Hi,
I am using multiple threads in my application and want to abort or close all threads when Exit application or click on Disconnect.But in my case as shown in code, thread status remain alive even I m aborting.Can any1 give me code snippset that how to abort thread successfully :
<code>         try
                {
                    // Client_Login clog = new Client_Login();
                    if (clog.clnt_th.IsAlive)
                    {
                        clog.clnt_th.Abort();//clog is other class object
                        clog.clnt_th.Join(1);
                    }
                     if (ClPb.thvidinfo.IsAlive)
                    {
                       ClPb.thvidinfo.Abort();//ClPb is other class object
                       ClPb.thvidinfo.Join(2);

                    }
                    if (ClPb.thvideofile.IsAlive)
                    {
                        ClPb.thvideofile.Abort();
                        ClPb.thvideofile.Join(3);
                    }
                   
                    if (thvideo.IsAlive)
                    {
                        thvideo.Abort();
                        thvideo.Join(4);
                    }

                }
                catch(System.Threading.ThreadAbortException thexp)
                {
                    MessageBox.Show("Time worker thread was aborted: " + DateTime.Now.ToString(),thexp.Message );

                }

</code>

thvideo is parent thread and thvideofile and thvidinfo is its child threads.

Shanzay

AnswerRe: Thread abortion before closing form Pin
leppie27-May-08 1:37
leppie27-May-08 1:37 
GeneralRe: Thread abortion before closing form Pin
DeepOceans28-May-08 1:46
DeepOceans28-May-08 1:46 
GeneralRe: Thread abortion before closing form Pin
leppie28-May-08 5:55
leppie28-May-08 5:55 
GeneralRe: Thread abortion before closing form Pin
DeepOceans29-May-08 0:26
DeepOceans29-May-08 0:26 
Questionlog4net FileAppender -&gt; Logging to File Pin
stephan_00727-May-08 0:24
stephan_00727-May-08 0:24 
AnswerRe: log4net FileAppender -&gt; Logging to File Pin
buchstaben27-May-08 1:23
buchstaben27-May-08 1:23 
GeneralRe: log4net FileAppender -&gt; Logging to File Pin
stephan_00727-May-08 3:27
stephan_00727-May-08 3:27 
QuestionThreading Common class Pin
kc_krishnan26-May-08 23:46
kc_krishnan26-May-08 23:46 
Questiongetting a data from a database and put in a xml document Pin
laziale26-May-08 23:19
laziale26-May-08 23:19 
AnswerRe: getting a data from a database and put in a xml document Pin
Giorgi Dalakishvili26-May-08 23:26
mentorGiorgi Dalakishvili26-May-08 23:26 
GeneralRe: getting a data from a database and put in a xml document Pin
laziale26-May-08 23:37
laziale26-May-08 23:37 
AnswerRe: getting a data from a database and put in a xml document Pin
Ashfield26-May-08 23:33
Ashfield26-May-08 23:33 
GeneralRe: getting a data from a database and put in a xml document Pin
laziale26-May-08 23:38
laziale26-May-08 23:38 
GeneralRe: getting a data from a database and put in a xml document Pin
Ashfield26-May-08 23:54
Ashfield26-May-08 23:54 
GeneralRe: getting a data from a database and put in a xml document Pin
laziale26-May-08 23:58
laziale26-May-08 23:58 
GeneralRe: getting a data from a database and put in a xml document Pin
Ashfield27-May-08 1:21
Ashfield27-May-08 1:21 
QuestionTask Bar Help Pin
Saiyed Alam26-May-08 23:02
Saiyed Alam26-May-08 23:02 

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.