Click here to Skip to main content
16,004,927 members
Home / Discussions / C#
   

C#

 
GeneralRe: how read the prevoius row from the sqldatareader Pin
N a v a n e e t h2-Nov-08 23:17
N a v a n e e t h2-Nov-08 23:17 
GeneralRe: how read the prevoius row from the sqldatareader Pin
Guffa3-Nov-08 6:37
Guffa3-Nov-08 6:37 
Questionproblem with MSDTC Pin
prasadbuddhika2-Nov-08 18:23
prasadbuddhika2-Nov-08 18:23 
AnswerRe: problem with MSDTC Pin
Ashfield2-Nov-08 20:22
Ashfield2-Nov-08 20:22 
Questionlistview Sorting Pin
vishnukamath2-Nov-08 17:59
vishnukamath2-Nov-08 17:59 
QuestionRemote connection question Pin
Tushar Mahajan2-Nov-08 17:56
Tushar Mahajan2-Nov-08 17:56 
Questioncontrols and thread in C# Pin
dec822-Nov-08 17:33
dec822-Nov-08 17:33 
AnswerRe: controls and thread in C# Pin
N a v a n e e t h2-Nov-08 17:46
N a v a n e e t h2-Nov-08 17:46 
trang1800 wrote:
how to show a progress bar without cross-thread error ?


Use Control.Invoke/BeginInvoke to safely update your controls from another thread. See the sample below
if (this.InvokeRequired) {
      this.BeginInvoke((MethodInvoker)delegate {
           // update your controls here
      });
}
InvokeRequired returns true if it is called from another thread which is not the owner of the control. MethodInvoker is a delegate provided in System.Windows.Forms namespace and can be used to represent parameterless methods. You can have your own delegate if you have parameters to be passed to the function which updates controls.

Alternatively, use BackgroundWorker helper class. It makes the control updation easy.


GeneralRe: controls and thread in C# Pin
dec822-Nov-08 23:17
dec822-Nov-08 23:17 
GeneralRe: controls and thread in C# Pin
N a v a n e e t h2-Nov-08 23:27
N a v a n e e t h2-Nov-08 23:27 
AnswerRe: controls and thread in C# Pin
blackjack21502-Nov-08 21:58
blackjack21502-Nov-08 21:58 
GeneralRe: controls and thread in C# Pin
N a v a n e e t h2-Nov-08 22:27
N a v a n e e t h2-Nov-08 22:27 
QuestionSSL between .Net server and Java client Pin
xax2-Nov-08 11:35
xax2-Nov-08 11:35 
AnswerRe: SSL between .Net server and Java client Pin
blackjack21503-Nov-08 0:34
blackjack21503-Nov-08 0:34 
GeneralRe: SSL between .Net server and Java client Pin
xax3-Nov-08 8:35
xax3-Nov-08 8:35 
QuestionMultiline Indent Pin
Caglow2-Nov-08 9:21
Caglow2-Nov-08 9:21 
AnswerRe: Multiline Indent Pin
Pedram Behroozi2-Nov-08 10:03
Pedram Behroozi2-Nov-08 10:03 
GeneralRe: Multiline Indent Pin
Caglow2-Nov-08 11:52
Caglow2-Nov-08 11:52 
GeneralRe: Multiline Indent Pin
Pedram Behroozi2-Nov-08 12:33
Pedram Behroozi2-Nov-08 12:33 
GeneralRe: Multiline Indent Pin
Caglow22-Nov-08 9:58
Caglow22-Nov-08 9:58 
GeneralRe: Multiline Indent Pin
Pedram Behroozi22-Nov-08 20:56
Pedram Behroozi22-Nov-08 20:56 
QuestionIs it possible to have multiple "lines" in a datagridview? Pin
shultas2-Nov-08 9:04
shultas2-Nov-08 9:04 
Questionembed command-line executable into windows form application Pin
LordZoster2-Nov-08 6:33
LordZoster2-Nov-08 6:33 
AnswerRe: embed command-line executable into windows form application Pin
Giorgi Dalakishvili2-Nov-08 6:58
mentorGiorgi Dalakishvili2-Nov-08 6:58 
QuestionThe run away process;) Pin
Muammar©2-Nov-08 5:42
Muammar©2-Nov-08 5:42 

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.