Click here to Skip to main content
15,917,564 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to write a Grid Pin
Nick Parker27-Nov-04 4:28
protectorNick Parker27-Nov-04 4:28 
AnswerRe: How to write a Grid Pin
Alex Korchemniy27-Nov-04 10:04
Alex Korchemniy27-Nov-04 10:04 
GeneralProgressBar Pin
MoustafaS27-Nov-04 0:41
MoustafaS27-Nov-04 0:41 
GeneralComboBox tooltips Pin
Mr.Cooper26-Nov-04 23:40
Mr.Cooper26-Nov-04 23:40 
Generalimplementing dts in c# Pin
Thirumalaraj26-Nov-04 22:08
Thirumalaraj26-Nov-04 22:08 
GeneralRe: implementing dts in c# Pin
David Salter27-Nov-04 1:12
David Salter27-Nov-04 1:12 
Generaldocking windows in an mdi app Pin
Anonymous26-Nov-04 20:07
Anonymous26-Nov-04 20:07 
GeneralProgressBar and Label Pin
26-Nov-04 19:15
suss26-Nov-04 19:15 
Hi,
I use ProgressBar and Label for Copy files from a directory to different directory to display status of progress. ProgressBar to display progress and Label to display current file number of progress.
But while procedure Copy running then Lable don't update it's values, when procedure Copy finish only then Lable update last it's value.

I used Refresh method of Label but procedure Copy terminated when I move main Windown.

My code:

private void Copy_File()
{
string SourceDir = "C:\\Source", DesDir = "C:\\Destination";
string[] sFileArr = System.IO.Directory.GetFiles(SourceDir);
string sSourceFile, sDesFile;

if (sFileArr.Length>0)
{
this.progressBar.Minimum = 0;
this.progressBar.Maximum = sFileArr.Length;
for(long iFile = 0; iFile < sFileArr.Length; iFile++)
{
sSourceFile = sFileArr[iFile];
sDesFile = DesDir + "\\" + System.IO.Path.GetFileName(sSourceFile);

this.Lable.Text = iFile.ToString();
this.progressBar.Value = iFile;
this.Lable.Refesh();
System.IO.File.Copy(sSourceFile, sDesFile, true);
}
}
}

Thanks,
GeneralRe: ProgressBar and Label Pin
Alex Korchemniy26-Nov-04 19:39
Alex Korchemniy26-Nov-04 19:39 
QuestionHow to get system data and time in C#? Pin
momer26-Nov-04 19:07
momer26-Nov-04 19:07 
AnswerRe: How to get system data and time in C#? Pin
Alex Korchemniy26-Nov-04 19:15
Alex Korchemniy26-Nov-04 19:15 
GeneralRe: How to get system data and time in C#? Pin
momer26-Nov-04 19:58
momer26-Nov-04 19:58 
GeneralRe: How to get system data and time in C#? Pin
Alex Korchemniy26-Nov-04 20:01
Alex Korchemniy26-Nov-04 20:01 
Questiongood C# design patten book?? Pin
koo926-Nov-04 18:25
koo926-Nov-04 18:25 
AnswerRe: good C# design patten book?? Pin
David Salter27-Nov-04 1:16
David Salter27-Nov-04 1:16 
Generalinter-form labels Pin
Pyro Joe26-Nov-04 17:44
Pyro Joe26-Nov-04 17:44 
GeneralRe: inter-form labels Pin
Alex Korchemniy26-Nov-04 19:12
Alex Korchemniy26-Nov-04 19:12 
GeneralRe: inter-form labels Pin
MoustafaS27-Nov-04 0:31
MoustafaS27-Nov-04 0:31 
GeneralImage Panning Pin
Heks26-Nov-04 12:16
Heks26-Nov-04 12:16 
GeneralRe: Image Panning Pin
DougW4826-Nov-04 13:08
DougW4826-Nov-04 13:08 
GeneralRe: Image Panning Pin
Heks26-Nov-04 13:56
Heks26-Nov-04 13:56 
GeneralRe: Image Panning Pin
Heks28-Nov-04 13:34
Heks28-Nov-04 13:34 
GeneralVisual C# Liabraries Pin
javaedict26-Nov-04 9:35
sussjavaedict26-Nov-04 9:35 
GeneralRe: Visual C# Liabraries Pin
MoustafaS27-Nov-04 0:36
MoustafaS27-Nov-04 0:36 
Generalusing csc.exe from an application Pin
thepersonof26-Nov-04 8:14
thepersonof26-Nov-04 8:14 

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.