Results 1 to 4 of 4

Thread: Strange but true ???

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Strange but true ???

    If I run the line of code “VScrollBar1.Value = VScrollBar1.Value – 1” I expect and want the Sub

    Code:
    Private Sub VScrollBar1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VScrollBar1.ValueChanged
    to run but it does not why

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Re: Strange but true ???

    I have just found out by putting a "Beep()" in the Sub code that the Sub does fire it's just that the debugger does not go to it which is even stranger

    Why Why Why ?

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Strange but true ???

    That is very interesting. Are you saying that if you put a breakpoint in the sub it is never hit, but if you don't put in a breakpoint, it IS hit?

    There was a peculiar "bug" in VB6 where the presence of a breakpoint could cause the Activate event to never fire for a form. In fact, I wrote a program and sent it to MS that showed that if the breakpoint was in one place, no Activate event was fired, while if you put the breakpoint in a different place, the Activate event on a totally inappropriate form (one that wasn't even loaded, if I remember it right) was run.

    I got a call back from MS telling me that this wasn't a bug, and that there was no way for the program to predict where to branch to under those conditions, so it was doing something inappropriate, but doing it because MS felt there was no determinable solution.

    If you have different event behavior with and without a breakpoint, it could be a new manifestation of that old issue. Since it wasn't a bug back then, it seems unlikely that they would have totally fixed it.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2006
    Posts
    612

    Re: Strange but true ???

    Shaggy

    I am not sure, all I know is what I said, the Beep sounds but the debugger never goes to that sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width