Click here to Skip to main content
15,893,663 members
Home / Discussions / C#
   

C#

 
AnswerRe: How i can connect my PDA to the Server Pin
N a v a n e e t h24-Nov-08 20:40
N a v a n e e t h24-Nov-08 20:40 
GeneralRe: How i can connect my PDA to the Server Pin
wasimsharp24-Nov-08 20:45
wasimsharp24-Nov-08 20:45 
QuestionRTSP connection Pin
Smithakrishnan24-Nov-08 19:29
Smithakrishnan24-Nov-08 19:29 
AnswerRe: RTSP connection Pin
N a v a n e e t h24-Nov-08 20:46
N a v a n e e t h24-Nov-08 20:46 
AnswerRe: RTSP connection Pin
etgfyujhug30-Apr-10 4:32
etgfyujhug30-Apr-10 4:32 
QuestionMy assembly name(xyz.dll) is not displaying in .net tab when i click on add reference Pin
srikanthkamuju24-Nov-08 18:30
srikanthkamuju24-Nov-08 18:30 
AnswerRe: My assembly name(xyz.dll) is not displaying in .net tab when i click on add reference Pin
Christian Graus24-Nov-08 19:08
protectorChristian Graus24-Nov-08 19:08 
Questionthreading with events Pin
asugix24-Nov-08 18:26
asugix24-Nov-08 18:26 
this question especially for Sacha Barber because I learn threading from his article (Beginners Guide To Threading In .NET Part 2 of n).
First Question : how to end / exit thread? From tutorial and MSDN help, I assume that thread is end when the thread function ends. Is this true ?
Before 2nd question, this is my code on worker thread:
C#
public event ReportConversion ReportConversionDone;        
...
private void RutinKonversi(object  fListobj)
{
   ...
   OnStatusReport(pd); //raising event
}
protected void OnStatusReport(ProggressDoneEventArgs e)
{
   if (ReportConversionDone != null) 
   {
      ReportConversionDone(this, e);
   }
}

This is my code on UI thread for handling thread event:
C#
void conv_ReportConversionDone(object sender, ProggressDoneEventArgs e)
{            
   //marshal to UI thread
   if (sender == conv)
   {        
        context.Post(new SendOrPostCallback(delegate(object gakPenting)
           {//inline code or anonymous method
            #region code event handler cross thread
              switch (e.ItemToReport)
              {
                  ...
              }
            #endregion
            }), null);
    }    
}

When I try passing data from background thread to UI, By putting breakpoints, I know if the thread is executed once. When I start worker thread for the first time (when application just started), event handler on UI is executed once. But when I start for third times, event handler is executed three times too. My 2nd question is : how to make event handler just executed once whenever worker thread is done. This is the screenshot :
first time[^]
third time I pressed extract[^]

No one can prevent me to learn something

AnswerRe: threading with events Pin
Christian Graus24-Nov-08 19:09
protectorChristian Graus24-Nov-08 19:09 
GeneralRe: threading with events Pin
asugix26-Nov-08 2:31
asugix26-Nov-08 2:31 
AnswerRe: threading with events Pin
N a v a n e e t h24-Nov-08 19:54
N a v a n e e t h24-Nov-08 19:54 
QuestionHow to change Label contrl's height and width runtime Pin
Software_Guy_12324-Nov-08 18:14
Software_Guy_12324-Nov-08 18:14 
AnswerRe: How to change Label contrl's height and width runtime Pin
Corayzon24-Nov-08 18:20
Corayzon24-Nov-08 18:20 
GeneralRe: How to change Label contrl's height and width runtime Pin
Software_Guy_12324-Nov-08 21:43
Software_Guy_12324-Nov-08 21:43 
GeneralRe: How to change Label contrl's height and width runtime Pin
Software_Guy_12326-Nov-08 18:08
Software_Guy_12326-Nov-08 18:08 
GeneralRe: How to change Label contrl's height and width runtime Pin
harschel1-Dec-09 1:13
harschel1-Dec-09 1:13 
QuestionC# :: Drag virtual file from listview to windows explorer Pin
Corayzon24-Nov-08 16:56
Corayzon24-Nov-08 16:56 
AnswerRe: C# :: Drag virtual file from listview to windows explorer Pin
Giorgi Dalakishvili26-Nov-08 8:53
mentorGiorgi Dalakishvili26-Nov-08 8:53 
Questionicons Pin
viciouskinid24-Nov-08 15:51
viciouskinid24-Nov-08 15:51 
AnswerRe: icons Pin
Christian Graus24-Nov-08 15:51
protectorChristian Graus24-Nov-08 15:51 
GeneralRe: icons Pin
viciouskinid24-Nov-08 16:16
viciouskinid24-Nov-08 16:16 
AnswerRe: icons Pin
Paul Conrad24-Nov-08 16:51
professionalPaul Conrad24-Nov-08 16:51 
AnswerRe: icons Pin
asugix24-Nov-08 17:32
asugix24-Nov-08 17:32 
QuestionVS-2005 C# windows forms and MS-Access 2003 Pin
AndieDu24-Nov-08 15:15
AndieDu24-Nov-08 15:15 
AnswerRe: VS-2005 C# windows forms and MS-Access 2003 Pin
Mycroft Holmes24-Nov-08 15:21
professionalMycroft Holmes24-Nov-08 15:21 

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.