Click here to Skip to main content
15,922,309 members
Home / Discussions / C#
   

C#

 
GeneralRe: Date Time Format Pin
PIEBALDconsult21-Jan-08 3:25
mvePIEBALDconsult21-Jan-08 3:25 
QuestionHow can i imbed an image to any dll in application running Pin
Naveed72720-Jan-08 19:55
Naveed72720-Jan-08 19:55 
AnswerRe: How can i imbed an image to any dll in application running Pin
Giorgi Dalakishvili21-Jan-08 2:20
mentorGiorgi Dalakishvili21-Jan-08 2:20 
GeneralData Table Relation in Dataset Pin
Rijz20-Jan-08 19:43
Rijz20-Jan-08 19:43 
QuestionSocket Programming - Detecting Client Disconnection Pin
Raja_Pandian20-Jan-08 18:44
Raja_Pandian20-Jan-08 18:44 
GeneralRe: Socket Programming - Detecting Client Disconnection Pin
m@u20-Jan-08 23:16
m@u20-Jan-08 23:16 
GeneralBackgroundWorker never completes it's work Pin
Clive D. Pottinger20-Jan-08 14:33
Clive D. Pottinger20-Jan-08 14:33 
GeneralRe: BackgroundWorker never completes it's work Pin
S. Senthil Kumar20-Jan-08 20:15
S. Senthil Kumar20-Jan-08 20:15 
That is not the way BackgroundWorkers are meant to be used. They are typically created to do some background work, report progress (if any) on the UI thread, and then indicate completion of the background work on the UI thread.

If all you need to do is update text from a non-UI thread, you are much better off using Control.Invoke[^] or Control.BeginInvoke[^].

Your code would then look like
delegate void StringInvoker(string t);

void AddEntry(string text)
{
   if (this.InvokeRequired)
   {
      this.Invoke(new StringInvoker(AddEntry), text); // recursively calls AddEntry, but the call comes on the UI thread, so InvokeRequired will be false.
      return;
   }
   this.Text = ...; // RunWorker_Completed logic goes here.
   }
}


Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | My Flickr | WinMacro

GeneralRe: BackgroundWorker never completes it's work Pin
Clive D. Pottinger21-Jan-08 4:31
Clive D. Pottinger21-Jan-08 4:31 
GeneralRe: BackgroundWorker never completes it's work Pin
Clive D. Pottinger21-Jan-08 4:34
Clive D. Pottinger21-Jan-08 4:34 
GeneralRe: BackgroundWorker never completes it's work Pin
S. Senthil Kumar21-Jan-08 19:49
S. Senthil Kumar21-Jan-08 19:49 
GeneralFlush JITtered Code Pin
Jeffrey Walton20-Jan-08 13:15
Jeffrey Walton20-Jan-08 13:15 
GeneralRe: Flush JITtered Code Pin
DavidNohejl20-Jan-08 15:17
DavidNohejl20-Jan-08 15:17 
GeneralCall constructor of parent class Pin
Jordanwb20-Jan-08 12:54
Jordanwb20-Jan-08 12:54 
AnswerRe: Call constructor of parent class Pin
Guffa20-Jan-08 13:13
Guffa20-Jan-08 13:13 
GeneralRe: Call constructor of parent class Pin
Jordanwb20-Jan-08 13:27
Jordanwb20-Jan-08 13:27 
Questionhow to convert access to sdf ? Pin
E_Gold20-Jan-08 10:40
E_Gold20-Jan-08 10:40 
GeneralGet *complete* XML from XDocument or convert to XMLDocument [modified] Pin
DaveyM6920-Jan-08 5:25
professionalDaveyM6920-Jan-08 5:25 
GeneralRe: Get *complete* XML from XDocument or convert to XMLDocument Pin
Paul Conrad20-Jan-08 9:01
professionalPaul Conrad20-Jan-08 9:01 
GeneralRe: Get *complete* XML from XDocument or convert to XMLDocument Pin
DaveyM6920-Jan-08 23:45
professionalDaveyM6920-Jan-08 23:45 
QuestionICaptureGraphBuilder2's FindPin() returning -tive value Pin
B!Z20-Jan-08 4:44
B!Z20-Jan-08 4:44 
GeneralRe: ICaptureGraphBuilder2's FindPin() returning -tive value Pin
Gareth H20-Jan-08 5:24
Gareth H20-Jan-08 5:24 
GeneralRe: ICaptureGraphBuilder2's FindPin() returning -tive value Pin
B!Z21-Jan-08 6:08
B!Z21-Jan-08 6:08 
QuestionListview focus Pin
eyalbi00720-Jan-08 3:38
eyalbi00720-Jan-08 3:38 
GeneralRe: Listview focus Pin
DaveyM6920-Jan-08 5:00
professionalDaveyM6920-Jan-08 5: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.