--- In [EMAIL PROTECTED], "elriba75" <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a batch process which reads all the records from a database > table and does something with them. The whole process takes about 5 > minutes. > > I want to display a label showing the percentage done. > > I tried: > > myLabel.Caption = CSTR(ROUND(100*(xDone/xTotal),2)) > DOEVENTS > > inside of the loop, but the caption only shows after the first record > processed. Afterwards it doesn't refresh. > > I also have a picturebox which I want to use as a progress control (by > changing its width), but that doesn't refresh either.... > > Is there a trick on how to refresh the form controls? > > Best regards, > Edgard Riba >
DoEvents won't help you. All DoEvents does is to have program execution yield to system processes. You need to repaint the form. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb-ce@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en -~----------~----~----~----~------~----~------~--~---