user1621488
user1621488

Reputation: 1

VB.net For loop weirdness?

So I decided to play with VB.net some, and the for loops seem to be horribly inaccurate. That, or I'm doing something wrong. Can someone assist me in my issue here?

Private Sub forLoop()
    For i = 0 To 10 Step 1
        'Do stuff
    Next i
End Sub

It seems to go through that anywhere between 3k to 200 times depending on what I have it do... Shouldn't it only go through that loop 10 times? I'm used to java, sorry if this is a super dumb question.

Upvotes: 0

Views: 252

Answers (1)

SSS
SSS

Reputation: 5393

The sendkeys is triggering the Button.Click event, so your app is in an infinite loop.

Upvotes: 2

Related Questions