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

C#

 
QuestionHow to Async download multiple files using webclient simultaneously? Pin
Tridip Bhattacharjee27-Mar-13 8:01
professionalTridip Bhattacharjee27-Mar-13 8:01 
QuestionScreenshots -> Video file Pin
ADASD33333227-Mar-13 4:06
ADASD33333227-Mar-13 4:06 
AnswerRe: Screenshots -> Video file Pin
Abhinav S29-Mar-13 4:00
Abhinav S29-Mar-13 4:00 
QuestionSaving Screensaver in C# Pin
greylakota27-Mar-13 3:34
greylakota27-Mar-13 3:34 
QuestionRe: Saving Screensaver in C# Pin
Richard MacCutchan27-Mar-13 3:56
mveRichard MacCutchan27-Mar-13 3:56 
AnswerRe: Saving Screensaver in C# Pin
Dave Kreskowiak27-Mar-13 4:05
mveDave Kreskowiak27-Mar-13 4:05 
GeneralRe: Saving Screensaver in C# Pin
Richard MacCutchan27-Mar-13 5:04
mveRichard MacCutchan27-Mar-13 5:04 
QuestionC# progress failed! Pin
ccahe27-Mar-13 2:37
ccahe27-Mar-13 2:37 
I write 2 functions in C# to control the progress in a C++ function, using callback

C#
public partial class HjCalibrateForm : Form
    {


      public static ProgressForm pro_form;  //a Form contains a progressbar



  static void progress_init(int max)
        {
            pro_form = new ProgressForm();
            pro_form.Show();
            pro_form.progressBar1.Minimum = 0;
            pro_form.progressBar1.Maximum = max;
   }

        static void setValue( )
        {
            pro_form.progressBar1.Step = 1;
            pro_form.progressBar1.PerformStep();
            if (pro_form.progressBar1.Value ==    pro_form.progressBar1.Maximum)
                pro_form.Dispose();
        }
}


Then in C++,callback
C++
progress_init(max)
for(int i=0;i<max;i++)
{
  ……//Data process
set_value();
}


it runs well when i Debug it, but if i excute it directly. It will fail(just stuck). No error message.

It may be something about the Thread, but i can't get it.

modified 27-Mar-13 23:00pm.

AnswerRe: C# progress failed! Pin
Dave Kreskowiak27-Mar-13 4:02
mveDave Kreskowiak27-Mar-13 4:02 
AnswerRe: C# progress failed! Pin
ccahe27-Mar-13 22:02
ccahe27-Mar-13 22:02 
Questionsettings file in relaunching the application Pin
KRISHNARAYALU27-Mar-13 1:24
KRISHNARAYALU27-Mar-13 1:24 
AnswerRe: settings file in relaunching the application Pin
Richard MacCutchan27-Mar-13 3:53
mveRichard MacCutchan27-Mar-13 3:53 
GeneralRe: settings file in relaunching the application Pin
KRISHNARAYALU27-Mar-13 7:39
KRISHNARAYALU27-Mar-13 7:39 
GeneralRe: settings file in relaunching the application Pin
Richard MacCutchan27-Mar-13 7:46
mveRichard MacCutchan27-Mar-13 7:46 
GeneralRe: settings file in relaunching the application Pin
KRISHNARAYALU27-Mar-13 17:05
KRISHNARAYALU27-Mar-13 17:05 
GeneralRe: settings file in relaunching the application Pin
Richard MacCutchan27-Mar-13 23:58
mveRichard MacCutchan27-Mar-13 23:58 
QuestionC# Convertion Pin
Midnight Ahri26-Mar-13 17:20
Midnight Ahri26-Mar-13 17:20 
AnswerRe: C# Convertion PinPopular
parths26-Mar-13 21:08
parths26-Mar-13 21:08 
GeneralRe: C# Convertion Pin
OriginalGriff26-Mar-13 21:21
mveOriginalGriff26-Mar-13 21:21 
GeneralRe: C# Convertion Pin
parths26-Mar-13 21:28
parths26-Mar-13 21:28 
GeneralRe: C# Convertion Pin
OriginalGriff26-Mar-13 21:34
mveOriginalGriff26-Mar-13 21:34 
GeneralRe: C# Convertion Pin
parths26-Mar-13 21:45
parths26-Mar-13 21:45 
AnswerRe: C# Convertion Pin
Midnight Ahri26-Mar-13 22:08
Midnight Ahri26-Mar-13 22:08 
GeneralRe: C# Convertion Pin
harold aptroot27-Mar-13 0:28
harold aptroot27-Mar-13 0:28 
AnswerRe: C# Convertion Pin
OriginalGriff26-Mar-13 21:33
mveOriginalGriff26-Mar-13 21:33 

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.