Results 1 to 6 of 6

Thread: simulating a scroll bar via picture box... but how to make it continous?

  1. #1

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    simulating a scroll bar via picture box... but how to make it continous?

    I have two picture boxes and a multiline textbox (with text in it)..

    am using the picture boxes as scroll bars (up and down), using the MouseDown event.

    this.. for going down the text box... (3 lines at a time)

    Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Text1.SetFocus
    SendKeys ("{down}")
    SendKeys ("{down}")
    SendKeys ("{down}")
    End Sub

    and similar for going up...


    anyway... does anyone know a way so that it will contiune to go down (or up) as long as the mouse is down on the pictrue box? instead of having to click repeadidily .... am trying to make it behave like a scroll bar.

    Abe
    1+1=3
    make life simple, use a calculator!

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    You know that textboxes have Scrollbars, don't you?
    Last edited by Mc Brain; Apr 25th, 2002 at 10:30 AM.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  3. #3

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    re:

    yep

    but I want to make my own kind...

    idea is to blend the textbox in a nice graphical form... and the standard scroll bar does not look good in it.

    Abe
    1+1=3
    make life simple, use a calculator!

  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Set a timer on the mousedown event, and disable it on the mouseup event. Call the sub Scroll on the timer's event:
    VB Code:
    1. Private Sub Scroll()
    2.   Text1.SetFocus
    3.   SendKeys ("{down}")
    4.   SendKeys ("{down}")
    5.   SendKeys ("{down}")
    6. End Sub
    Do you get the idea, or you need the whole example?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  5. #5

    Thread Starter
    Hyperactive Member Abdulrahman's Avatar
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    281

    thanx

    thanx
    got the idea
    Abe
    1+1=3
    make life simple, use a calculator!

  6. #6
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    U R welcome
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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