Results 1 to 5 of 5

Thread: Vscrollbar problem

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Vscrollbar problem

    Hello peeps. I have a vertical scrollbar on my form that i want to be able to drag up and down and also use the up/down (small change) arrows. My problem is that when i drag the scroller up and down the _Scroll even is fired which then automatically triggers the _Change event and my code in both is run. How do i detect in the _Change event that the small change arrows were actually clicked and its not because of a trigger from the Slider? Thanks
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Ok,....code attached (sample proj to demonstrate what i mean.

    2 events in the form...Scroll and Change,

    Clicking on the small change button (up and down arrow) only runs the Change event. thats ok.
    Dragging the scrollbar with the mouse performs the scroll event while you are holding the mouse click but on releasing it it the runs the change event. I dont want it to run the code in both these event when u scroll, just the one. How do i stop the scroll event running the code in the change event? Is there a flag u can test to say which particular action triggered the event? The Scroll event is obviously automatically running the Change event. Thanks.
    Attached Files Attached Files
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  4. #4
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775

    Im not sure you will be able to do this as the event is being fired when you release the mouse left button.
    I may be wrong but I cant think of a way right now.
    sorry

  5. #5

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    OK laserman thanks for your feedback. Instead of sitting here being lazy waiting for u guys to fix it ill start looking for a way round it Thanks
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

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