Good scroll bar control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arlie Rahn

    #1

    Good scroll bar control

    I would like to ad a custom scroll bar control to my app that has a
    customizable and "flat" look to it (not the normal VB look). Does anyone
    have any ideas on where to find a good one?


  • Arlie Rahn

    #2
    Re: Good scroll bar control

    Anyone? This is also for VB 6.0.

    "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
    news:TGYJc.8047 $%p4.2152@okepr ead04...[color=blue]
    > I would like to ad a custom scroll bar control to my app that has a
    > customizable and "flat" look to it (not the normal VB look). Does anyone
    > have any ideas on where to find a good one?
    >
    >[/color]


    Comment

    • joe herzog

      #3
      Re: Good scroll bar control

      From the sdk:

      Flat Scroll Bars

      Microsoft® Internet Explorer Version 4.0 introduced a new visual
      technology called flat scroll bars. Functionally, flat scroll bars
      behave just like standard scroll bars. The difference is that you can
      customize their appearance to a greater extent than standard scroll
      bars.

      Note Flat scroll bar APIs are implemented in version 4.71 and later of
      Comctl32.dll.

      In other words: Flat scroll bars are part of the os, if you have ie
      installed.

      Hope it helps,
      Joe


      "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message news:<MriMc.133 58$%p4.2005@oke pread04>...[color=blue]
      > Anyone? This is also for VB 6.0.
      >
      > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
      > news:TGYJc.8047 $%p4.2152@okepr ead04...[color=green]
      > > I would like to ad a custom scroll bar control to my app that has a
      > > customizable and "flat" look to it (not the normal VB look). Does anyone
      > > have any ideas on where to find a good one?
      > >
      > >[/color][/color]

      Comment

      • Arlie Rahn

        #4
        Re: Good scroll bar control

        Yeah, the problem is you can't customize the color and it doesn't support
        the mouse wheel. I'm looking to have that functionality as well.

        "joe herzog" <jherzog@csi.co m> wrote in message
        news:3d8e8253.0 407240826.57eae 42d@posting.goo gle.com...[color=blue]
        > From the sdk:
        >
        > Flat Scroll Bars
        >
        > Microsoft® Internet Explorer Version 4.0 introduced a new visual
        > technology called flat scroll bars. Functionally, flat scroll bars
        > behave just like standard scroll bars. The difference is that you can
        > customize their appearance to a greater extent than standard scroll
        > bars.
        >
        > Note Flat scroll bar APIs are implemented in version 4.71 and later of
        > Comctl32.dll.
        >
        > In other words: Flat scroll bars are part of the os, if you have ie
        > installed.
        >
        > Hope it helps,
        > Joe
        >
        >
        > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message[/color]
        news:<MriMc.133 58$%p4.2005@oke pread04>...[color=blue][color=green]
        > > Anyone? This is also for VB 6.0.
        > >
        > > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
        > > news:TGYJc.8047 $%p4.2152@okepr ead04...[color=darkred]
        > > > I would like to ad a custom scroll bar control to my app that has a
        > > > customizable and "flat" look to it (not the normal VB look). Does[/color][/color][/color]
        anyone[color=blue][color=green][color=darkred]
        > > > have any ideas on where to find a good one?
        > > >
        > > >[/color][/color][/color]


        Comment

        • Kiteman - Canada

          #5
          Re: Good scroll bar control

          Arlie, why don't you just make your own?

          I know that I write ugly code...but it tends to work :-)

          Make a Label in your choice of size/colour and just use the MouseMove event
          to track its horizontal movement across the form. Draw a rectangle around
          the desired area to make it look like a "real" scroll bar. You can then
          choose whether you wish to put the arrows at each end of the "control".

          I don't the foggiest idea of how to capture the mouse scroll wheel but you
          might get somewhere with:


          There are a few other traps that are required in the code below to constrain
          the returned values, but it might get you thinking in another direction.
          You also seem to have a habit of criticizing responses you receive on this
          newsgroup. Make sure that you declare all that you require in your
          solution before posting it. It is not nice form to declare someones
          solution as unworkable because it does not support colours or a mousewheel
          when you did not specify that in the original question.

          Make sure that your forms scalemode is set to Twips and the DragMode of your
          Label is set to manual.

          Private Sub Label1_MouseDow n(Button As Integer, Shift As Integer, X As
          Single, Y As Single)
          StartX = X
          End Sub

          Private Sub Label1_MouseMov e(Button As Integer, Shift As Integer, X As
          Single, Y As Single)
          minLeft = 1080
          maxRight = 8490

          If Button = 1 And Label1.Left >= minLeft And Label1.Left <= maxRight Then
          Label1.Left = Label1.Left + X - StartX
          End If

          If Label1.Left < minLeft Then Label1.Left = minLeft
          If Label1.Left > maxRight Then Label1.Left = maxRight
          End Sub


          Tom


          "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
          news:OfYMc.2316 $zA4.593@lakere ad04...[color=blue]
          > Yeah, the problem is you can't customize the color and it doesn't support
          > the mouse wheel. I'm looking to have that functionality as well.
          >[color=green]
          > >
          > > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message[/color]
          > news:<MriMc.133 58$%p4.2005@oke pread04>...[color=green][color=darkred]
          > > > Anyone? This is also for VB 6.0.
          > > >
          > > > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
          > > > news:TGYJc.8047 $%p4.2152@okepr ead04...
          > > > > I would like to ad a custom scroll bar control to my app that has a
          > > > > customizable and "flat" look to it (not the normal VB look). Does[/color][/color]
          > anyone[color=green][color=darkred]
          > > > > have any ideas on where to find a good one?
          > > > >
          > > > >[/color][/color]
          >
          >[/color]


          Comment

          • Arlie Rahn

            #6
            Re: Good scroll bar control

            I ended up doing just that using customizable images for the arrows and
            middle thumb of the scroll bar. To get around the scroll-mouse issue, I
            mapped the handle for the form and captured the scroll message (522) and
            manually moved it up or down based on the wParam value. Seems to be working
            OK. Thanks for your help though. I was just surprised that there was no good
            customizable scroll control (even via subclassing). I looked at the one on
            vbaccelerator.c om and it left a lot to be desired and was a bit bloated with
            ocxs and controls I didn't need.

            "Kiteman - Canada" <-delete-kiteman@shaw.ca > wrote in message
            news:B0fNc.1166 83$od7.29288@pd 7tw3no...[color=blue]
            > Arlie, why don't you just make your own?
            >
            > I know that I write ugly code...but it tends to work :-)
            >
            > Make a Label in your choice of size/colour and just use the MouseMove[/color]
            event[color=blue]
            > to track its horizontal movement across the form. Draw a rectangle[/color]
            around[color=blue]
            > the desired area to make it look like a "real" scroll bar. You can then
            > choose whether you wish to put the arrows at each end of the "control".
            >
            > I don't the foggiest idea of how to capture the mouse scroll wheel but you
            > might get somewhere with:
            > http://www.adit.co.uk/html/mousewheelsupport.html
            >
            > There are a few other traps that are required in the code below to[/color]
            constrain[color=blue]
            > the returned values, but it might get you thinking in another direction.
            > You also seem to have a habit of criticizing responses you receive on this
            > newsgroup. Make sure that you declare all that you require in your
            > solution before posting it. It is not nice form to declare someones
            > solution as unworkable because it does not support colours or a mousewheel
            > when you did not specify that in the original question.
            >
            > Make sure that your forms scalemode is set to Twips and the DragMode of[/color]
            your[color=blue]
            > Label is set to manual.
            >
            > Private Sub Label1_MouseDow n(Button As Integer, Shift As Integer, X As
            > Single, Y As Single)
            > StartX = X
            > End Sub
            >
            > Private Sub Label1_MouseMov e(Button As Integer, Shift As Integer, X As
            > Single, Y As Single)
            > minLeft = 1080
            > maxRight = 8490
            >
            > If Button = 1 And Label1.Left >= minLeft And Label1.Left <= maxRight Then
            > Label1.Left = Label1.Left + X - StartX
            > End If
            >
            > If Label1.Left < minLeft Then Label1.Left = minLeft
            > If Label1.Left > maxRight Then Label1.Left = maxRight
            > End Sub
            >
            >
            > Tom
            >
            >
            > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
            > news:OfYMc.2316 $zA4.593@lakere ad04...[color=green]
            > > Yeah, the problem is you can't customize the color and it doesn't[/color][/color]
            support[color=blue][color=green]
            > > the mouse wheel. I'm looking to have that functionality as well.
            > >[color=darkred]
            > > >
            > > > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message[/color]
            > > news:<MriMc.133 58$%p4.2005@oke pread04>...[color=darkred]
            > > > > Anyone? This is also for VB 6.0.
            > > > >
            > > > > "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
            > > > > news:TGYJc.8047 $%p4.2152@okepr ead04...
            > > > > > I would like to ad a custom scroll bar control to my app that has[/color][/color][/color]
            a[color=blue][color=green][color=darkred]
            > > > > > customizable and "flat" look to it (not the normal VB look). Does[/color]
            > > anyone[color=darkred]
            > > > > > have any ideas on where to find a good one?
            > > > > >
            > > > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • J French

              #7
              Re: Good scroll bar control

              On Mon, 26 Jul 2004 16:20:55 -0700, "Arlie Rahn"
              <arlierahn@nosp am.cox.net> wrote:
              [color=blue]
              >I ended up doing just that using customizable images for the arrows and
              >middle thumb of the scroll bar. To get around the scroll-mouse issue, I
              >mapped the handle for the form and captured the scroll message (522) and
              >manually moved it up or down based on the wParam value. Seems to be working
              >OK. Thanks for your help though. I was just surprised that there was no good
              >customizable scroll control (even via subclassing). I looked at the one on
              >vbaccelerator. com and it left a lot to be desired and was a bit bloated with
              >ocxs and controls I didn't need.[/color]

              Have you had a look at the DrawFrameContro l API ?

              Comment

              • Arlie Rahn

                #8
                Re: Good scroll bar control


                "J French" <erewhon@nowher e.com> wrote in message
                news:41060f64.5 963024@news.btc lick.com...[color=blue]
                > On Mon, 26 Jul 2004 16:20:55 -0700, "Arlie Rahn"
                > <arlierahn@nosp am.cox.net> wrote:
                >[color=green]
                > >I ended up doing just that using customizable images for the arrows and
                > >middle thumb of the scroll bar. To get around the scroll-mouse issue, I
                > >mapped the handle for the form and captured the scroll message (522) and
                > >manually moved it up or down based on the wParam value. Seems to be[/color][/color]
                working[color=blue][color=green]
                > >OK. Thanks for your help though. I was just surprised that there was no[/color][/color]
                good[color=blue][color=green]
                > >customizable scroll control (even via subclassing). I looked at the one[/color][/color]
                on[color=blue][color=green]
                > >vbaccelerator. com and it left a lot to be desired and was a bit bloated[/color][/color]
                with[color=blue][color=green]
                > >ocxs and controls I didn't need.[/color]
                >
                > Have you had a look at the DrawFrameContro l API ?[/color]

                No, I haven't. Maybe I'll check that out as well.


                Comment

                • J French

                  #9
                  Re: Good scroll bar control

                  On Tue, 27 Jul 2004 06:44:34 -0700, "Arlie Rahn"
                  <arlierahn@nosp am.cox.net> wrote:

                  <snip>
                  [color=blue][color=green]
                  >> Have you had a look at the DrawFrameContro l API ?[/color]
                  >
                  >No, I haven't. Maybe I'll check that out as well.[/color]

                  I wish I had known about it some six years ago

                  If you do not have it already get the API Guide frome www.AllAppi.net
                  you will need to follow the links for 'API List'

                  Hey guys, why do we not have a simple list of links for the basic
                  tools ?


                  Comment

                  • Arlie Rahn

                    #10
                    Re: Good scroll bar control


                    "J French" <erewhon@nowher e.com> wrote in message
                    news:41066a4f.2 9240905@news.bt click.com...[color=blue]
                    > On Tue, 27 Jul 2004 06:44:34 -0700, "Arlie Rahn"
                    > <arlierahn@nosp am.cox.net> wrote:
                    >
                    > <snip>
                    >[color=green][color=darkred]
                    > >> Have you had a look at the DrawFrameContro l API ?[/color]
                    > >
                    > >No, I haven't. Maybe I'll check that out as well.[/color]
                    >
                    > I wish I had known about it some six years ago
                    >
                    > If you do not have it already get the API Guide frome www.AllAppi.net
                    > you will need to follow the links for 'API List'
                    >
                    > Hey guys, why do we not have a simple list of links for the basic
                    > tools ?[/color]

                    The above link is dead.[color=blue]
                    >
                    >[/color]


                    Comment

                    • Steve Gerrard

                      #11
                      Re: Good scroll bar control


                      "Arlie Rahn" <arlierahn@nosp am.cox.net> wrote in message
                      news:mfCNc.1659 3$%p4.9056@okep read04...
                      |

                      | > If you do not have it already get the API Guide frome

                      | > you will need to follow the links for 'API List'
                      | >
                      | > Hey guys, why do we not have a simple list of links for the basic
                      | > tools ?
                      |
                      | The above link is dead.
                      | >
                      | >
                      |
                      He meant www.allapi.net


                      Comment

                      • Steve Gerrard

                        #12
                        Re: Good scroll bar control


                        "J French" <erewhon@nowher e.com> wrote in message
                        news:41066a4f.2 9240905@news.bt click.com...

                        | Hey guys, why do we not have a simple list of links for the basic
                        | tools ?
                        |

                        It is odd that Rick has that canned list of .Net sites, but we never see
                        a standard list of VB sites, this being a VB newsgroup and all.

                        I nominate you for the job. <g>


                        Comment

                        • J French

                          #13
                          Re: Good scroll bar control

                          On Tue, 27 Jul 2004 18:36:48 -0700, "Steve Gerrard"
                          <notstevegerrar d@comcast.net> wrote:

                          <snip>
                          [color=blue]
                          >It is odd that Rick has that canned list of .Net sites, but we never see
                          >a standard list of VB sites, this being a VB newsgroup and all.
                          >
                          >I nominate you for the job. <g>[/color]

                          Good idea, here are some from my snippings file:

                          www.planetsourcecode.com/vb - Source Code/Tutorials
                          http://abstractvb.com/default.asp - Source Code/Tutorials

                          www.vbtt.com - Visual Basic Tips and Tricks
                          www.a1vbcode.com - Source Code/Demos
                          www.vbexplorer.com - Source Code/Demos/Tutorials




                          http://vbnet.mvps.org/ Randy Birch - new address
                          http://www.freevbcode.com/ShowCode.Asp?ID=4322

                          homepage http://www.kingsoft-denmark.com/
                          Tips & Tricks page http://tips.kingsoft-denmark.com/

                          מגזין V.B: טעויות נפוצות בניהול תקציב משפחתי, סיבות לסירוב משכנתא ופתיחת חנות אונליין — מתקדמים חכם בעולם הפיננסים והדיגיטל.

                          APIViewer 2004

                          Free software components for C#, VB.NET and other .NET languages.



                          Comment

                          Working...