Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# coding style question Pin
Rakesh Meel4-Sep-13 20:48
professionalRakesh Meel4-Sep-13 20:48 
AnswerRe: C# coding style question Pin
Ricardo Kajihara4-Sep-13 21:33
Ricardo Kajihara4-Sep-13 21:33 
AnswerRe: C# coding style question Pin
Christopher Kenis5-Sep-13 1:04
professionalChristopher Kenis5-Sep-13 1:04 
AnswerRe: C# coding style question Pin
Eytukan5-Sep-13 7:21
Eytukan5-Sep-13 7:21 
GeneralRe: C# coding style question Pin
BillWoodruff5-Sep-13 18:35
professionalBillWoodruff5-Sep-13 18:35 
GeneralRe: C# coding style question Pin
Eytukan5-Sep-13 19:02
Eytukan5-Sep-13 19:02 
AnswerRe: C# coding style question Pin
V.6-Sep-13 1:48
professionalV.6-Sep-13 1:48 
QuestionThread Progress Bar Pin
juliogyn4-Sep-13 8:31
juliogyn4-Sep-13 8:31 
I have this code:
C#
public void mtdProgressbar() {

            prgsBar.IsIndeterminate = false;

            prgsBar.Orientation = Orientation.Horizontal;

            prgsBar.Minimum = 0;

            prgsBar.Maximum = short.MaxValue;

            prgsBar.Value = 0;

            double value = 0;

            prgsBar.Visibility = Visibility;

            UpdateProgressBarDelegate updatePbDelegate = new UpdateProgressBarDelegate(prgsBar.SetValue);

            do
            {
                value += 1;

                Dispatcher.Invoke(updatePbDelegate,   System.Windows.Threading.DispatcherPriority.Background,new object[] { ProgressBar.ValueProperty, value });
            }
            while (prgsBar.Value != prgsBar.Maximum);

            prgsBar.Visibility = Visibility.Hidden;
        }

But i can not create the Thread do fill progressbar, do not work.
The code:
C#
.
.
. 
else{
System.Threading.Thread trd = new System.Threading.Thread(new System.Threading.ThreadStart(this.mtdProgressbar));
                trd.IsBackground = true;
                trd.Start();
mtdTest(); //this method contains only loop for,represents an operation that requires the progressbar
}

I'm using C# and Wpf
AnswerRe: Thread Progress Bar Pin
Forbiddenx4-Sep-13 9:01
Forbiddenx4-Sep-13 9:01 
GeneralRe: Thread Progress Bar Pin
BillWoodruff4-Sep-13 17:23
professionalBillWoodruff4-Sep-13 17:23 
GeneralRe: Thread Progress Bar Pin
Forbiddenx6-Sep-13 1:16
Forbiddenx6-Sep-13 1:16 
AnswerRe: Thread Progress Bar Pin
Dave Kreskowiak4-Sep-13 9:03
mveDave Kreskowiak4-Sep-13 9:03 
AnswerRe: Thread Progress Bar Pin
V.6-Sep-13 1:51
professionalV.6-Sep-13 1:51 
QuestionAny Ideas or feedback for a C# final year programming project? Pin
johnmolo4-Sep-13 4:11
johnmolo4-Sep-13 4:11 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
Forbiddenx4-Sep-13 4:51
Forbiddenx4-Sep-13 4:51 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
Richard MacCutchan4-Sep-13 4:56
mveRichard MacCutchan4-Sep-13 4:56 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
Mycroft Holmes4-Sep-13 12:51
professionalMycroft Holmes4-Sep-13 12:51 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
Praveen Maniyath4-Sep-13 20:31
Praveen Maniyath4-Sep-13 20:31 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
AmitGajjar4-Sep-13 21:03
professionalAmitGajjar4-Sep-13 21:03 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
Praveen Maniyath4-Sep-13 23:49
Praveen Maniyath4-Sep-13 23:49 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
Pete O'Hanlon4-Sep-13 21:11
mvePete O'Hanlon4-Sep-13 21:11 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
AmitGajjar4-Sep-13 21:15
professionalAmitGajjar4-Sep-13 21:15 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
Praveen Maniyath4-Sep-13 23:52
Praveen Maniyath4-Sep-13 23:52 
GeneralRe: Any Ideas or feedback for a C# final year programming project? Pin
Pete O'Hanlon5-Sep-13 0:39
mvePete O'Hanlon5-Sep-13 0:39 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
AmitGajjar4-Sep-13 21:12
professionalAmitGajjar4-Sep-13 21:12 

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.