|
-
Aug 10th, 2000, 02:10 AM
#1
Thread Starter
New Member
I'm having trouble with performance in VB. I want to do a big loop with some math inside it. At the same time I want to display the result in a label.
Why can't VB manage to show the label until the loop has ended? Help me somone!
Down below is an example:
Private Sub Command1_Click()
For i = 1 To 2000000
For x = 1 To 10
a = a + i * x
Next x
Label1.Caption = a
Next i
End Sub
-
Aug 10th, 2000, 02:20 AM
#2
Hyperactive Member
Put DoEvents after you set the caption.
-
Aug 10th, 2000, 02:54 AM
#3
Or Refresh the label inside the loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|