Click here to Skip to main content
15,850,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Read mails from mail server Pin
AmitSumit24-Apr-06 22:11
AmitSumit24-Apr-06 22:11 
QuestionFile Systems in asp.net Pin
spokione23-Apr-06 22:03
spokione23-Apr-06 22:03 
QuestionProblem in Console application Pin
Sunny H23-Apr-06 21:59
Sunny H23-Apr-06 21:59 
AnswerRe: Problem in Console application Pin
karande2323-Apr-06 22:05
karande2323-Apr-06 22:05 
GeneralRe: Problem in Console application Pin
karande2323-Apr-06 22:11
karande2323-Apr-06 22:11 
AnswerRe: Problem in Console application Pin
HimaBindu Vejella23-Apr-06 22:45
HimaBindu Vejella23-Apr-06 22:45 
Questionthreading Pin
karande2323-Apr-06 21:55
karande2323-Apr-06 21:55 
AnswerRe: threading Pin
Robert Rohde24-Apr-06 1:09
Robert Rohde24-Apr-06 1:09 
This way it doesn't make much sense. You are starting a thread which calls Progress in the GUI thread (which will block all repainting because of the Thread.Sleep).
It should more look like the following:
private void button2_Click(object sender, EventArgs e)
{
   demothread = new Thread(new ThreadStart(ProgSafe));
   demothread.Start();
}

private void ProgSafe()
{
   for (int i = 0; i < 100; i++)
   {
      Thread.Sleep(200);
      if (this.progressBar1.InvokeRequired)
         this.Invoke(new SetProgCall(IncreaseProgress));
      else
         IncreaseProgress();
   }
}

private void IncreaseProgress()
{
   this.progressBar1.Value += 1;
}

Now the whole work is done in the thread and just the update of the progress bar is delegated to the GUI thread.
QuestionPrevent user from opening >1 subform Pin
livez23-Apr-06 21:45
livez23-Apr-06 21:45 
AnswerRe: Prevent user from opening &gt;1 subform Pin
Naveed Kamboh24-Apr-06 2:36
Naveed Kamboh24-Apr-06 2:36 
GeneralRe: Prevent user from opening &gt;1 subform Pin
livez24-Apr-06 2:40
livez24-Apr-06 2:40 
AnswerRe: Prevent user from opening >1 subform Pin
The Nemesis24-Apr-06 3:44
The Nemesis24-Apr-06 3:44 
QuestionHow to Detect the CD drive and USB drives using# Pin
ranandbe23-Apr-06 20:57
ranandbe23-Apr-06 20:57 
Questionpassing string arrays between clients side and server side Pin
umaheshchandra23-Apr-06 20:53
umaheshchandra23-Apr-06 20:53 
AnswerRe: passing string arrays between clients side and server side Pin
HimaBindu Vejella24-Apr-06 0:27
HimaBindu Vejella24-Apr-06 0:27 
QuestionUse mouse in Console Application in C# Pin
Sunny H23-Apr-06 20:09
Sunny H23-Apr-06 20:09 
AnswerRe: Use mouse in Console Application in C# Pin
Christian Graus23-Apr-06 20:18
protectorChristian Graus23-Apr-06 20:18 
Questionlistview Pin
phucoi23-Apr-06 19:40
phucoi23-Apr-06 19:40 
AnswerRe: listview Pin
Naveed Kamboh24-Apr-06 0:59
Naveed Kamboh24-Apr-06 0:59 
AnswerRe: listview Pin
CWIZO24-Apr-06 0:59
CWIZO24-Apr-06 0:59 
QuestionAdding a phantom item to a databound combo box? Pin
Furty23-Apr-06 19:33
Furty23-Apr-06 19:33 
AnswerRe: Adding a phantom item to a databound combo box? Pin
Josh Smith24-Apr-06 5:41
Josh Smith24-Apr-06 5:41 
QuestionLDAP & Create User Pin
AnhTin23-Apr-06 18:40
AnhTin23-Apr-06 18:40 
QuestionEnable Tabpage in Tabcontrol Pin
phucoi23-Apr-06 18:33
phucoi23-Apr-06 18:33 
AnswerRe: Enable Tabpage in Tabcontrol Pin
Robert Rohde23-Apr-06 20:50
Robert Rohde23-Apr-06 20:50 

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.