Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > ActiveX .NET cannot update label's Text value?

Reply
Thread Tools

ActiveX .NET cannot update label's Text value?

 
 
dvietha@gmail.com
Guest
Posts: n/a
 
      08-04-2006
Hi All,

I write an ActiveX containing a progress bar and a label by C#. When
running in IE, the progress bar is OK; but I cannot update the value of
label's Text.

Plz explain this problem for me

thanks,
HaDV

 
Reply With Quote
 
 
 
 
dvietha@gmail.com
Guest
Posts: n/a
 
      08-04-2006

wrote:
> Hi All,
>
> I write an ActiveX containing a progress bar and a label by C#. When
> running in IE, the progress bar is OK; but I cannot update the value of
> label's Text.
>
> Plz explain this problem for me
>
> thanks,
> HaDV


Following is my code:
for (int i=1; i <= totalFile; i++)
{
Thread.Sleep(this.SleepTime);
completedFile += 1;
lblProgress.Text = String.Format("{0} / {1}", completedFile,
totalFile);
progressBar.PerformStep();
}

 
Reply With Quote
 
 
 
 
dvietha@gmail.com
Guest
Posts: n/a
 
      08-04-2006

wrote:
> wrote:
> > Hi All,
> >
> > I write an ActiveX containing a progress bar and a label by C#. When
> > running in IE, the progress bar is OK; but I cannot update the value of
> > label's Text.
> >
> > Plz explain this problem for me
> >
> > thanks,
> > HaDV

>
> Following is my code:
> for (int i=1; i <= totalFile; i++)
> {
> Thread.Sleep(this.SleepTime);
> completedFile += 1;
> lblProgress.Text = String.Format("{0} / {1}", completedFile,
> totalFile);
> progressBar.PerformStep();
> }


I got it.

Adding lblProgress.Update() after lblProgress.Text = ... like below:
for (int i=1; i <= totalFile; i++)
{
Thread.Sleep(this.SleepTime);
completedFile += 1;
lblProgress.Text = String.Format("{0} / {1}", completedFile,
totalFile);
lblProgress.Update();
progressBar.PerformStep();
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update On The Windows Phone 7 Update Update Lawrence D'Oliveiro NZ Computing 2 02-25-2011 08:03 AM
Java EE 6 Update Tool cannot do update narke Java 1 10-21-2010 12:39 PM
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
Cannot get ASP.NET page to work with ActiveX control Edward ASP .Net 0 07-28-2003 02:56 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57