By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,318 Members | 2,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,318 IT Pros & Developers. It's quick & easy.

Good scroll bar control

P: n/a
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?
Jul 17 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Anyone? This is also for VB 6.0.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
news:TGYJc.8047$%p4.2152@okepread04...
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?

Jul 17 '05 #2

P: n/a
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" <ar*******@nospam.cox.net> wrote in message news:<MriMc.13358$%p4.2005@okepread04>...
Anyone? This is also for VB 6.0.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
news:TGYJc.8047$%p4.2152@okepread04...
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?

Jul 17 '05 #3

P: n/a
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" <jh*****@csi.com> wrote in message
news:3d**************************@posting.google.c om...
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" <ar*******@nospam.cox.net> wrote in message

news:<MriMc.13358$%p4.2005@okepread04>...
Anyone? This is also for VB 6.0.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
news:TGYJc.8047$%p4.2152@okepread04...
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?

Jul 17 '05 #4

P: n/a
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:
http://www.adit.co.uk/html/mousewheelsupport.html

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_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
StartX = X
End Sub

Private Sub Label1_MouseMove(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" <ar*******@nospam.cox.net> wrote in message
news:OfYMc.2316$zA4.593@lakeread04...
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.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message

news:<MriMc.13358$%p4.2005@okepread04>...
Anyone? This is also for VB 6.0.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
news:TGYJc.8047$%p4.2152@okepread04...
> 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?
>
>


Jul 17 '05 #5

P: n/a
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.

"Kiteman - Canada" <-d*************@shaw.ca> wrote in message
news:B0fNc.116683$od7.29288@pd7tw3no...
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:
http://www.adit.co.uk/html/mousewheelsupport.html

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_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
StartX = X
End Sub

Private Sub Label1_MouseMove(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" <ar*******@nospam.cox.net> wrote in message
news:OfYMc.2316$zA4.593@lakeread04...
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.

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message

news:<MriMc.13358$%p4.2005@okepread04>...
> Anyone? This is also for VB 6.0.
>
> "Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
> news:TGYJc.8047$%p4.2152@okepread04...
> > 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?
> >
> >



Jul 17 '05 #6

P: n/a
On Mon, 26 Jul 2004 16:20:55 -0700, "Arlie Rahn"
<ar*******@nospam.cox.net> wrote:
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.


Have you had a look at the DrawFrameControl API ?

Jul 17 '05 #7

P: n/a

"J French" <er*****@nowhere.com> wrote in message
news:41**************@news.btclick.com...
On Mon, 26 Jul 2004 16:20:55 -0700, "Arlie Rahn"
<ar*******@nospam.cox.net> wrote:
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 workingOK. Thanks for your help though. I was just surprised that there was no goodcustomizable scroll control (even via subclassing). I looked at the one onvbaccelerator.com and it left a lot to be desired and was a bit bloated withocxs and controls I didn't need.


Have you had a look at the DrawFrameControl API ?


No, I haven't. Maybe I'll check that out as well.
Jul 17 '05 #8

P: n/a
On Tue, 27 Jul 2004 06:44:34 -0700, "Arlie Rahn"
<ar*******@nospam.cox.net> wrote:

<snip>
Have you had a look at the DrawFrameControl API ?


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


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 ?
Jul 17 '05 #9

P: n/a

"J French" <er*****@nowhere.com> wrote in message
news:41***************@news.btclick.com...
On Tue, 27 Jul 2004 06:44:34 -0700, "Arlie Rahn"
<ar*******@nospam.cox.net> wrote:

<snip>
Have you had a look at the DrawFrameControl API ?
No, I haven't. Maybe I'll check that out as well.


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 ?


The above link is dead.

Jul 17 '05 #10

P: n/a

"Arlie Rahn" <ar*******@nospam.cox.net> wrote in message
news:mfCNc.16593$%p4.9056@okepread04...
|

| > 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 ?
|
| The above link is dead.
| >
| >
|
He meant www.allapi.net
Jul 17 '05 #11

P: n/a

"J French" <er*****@nowhere.com> wrote in message
news:41***************@news.btclick.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>
Jul 17 '05 #12

P: n/a
On Tue, 27 Jul 2004 18:36:48 -0700, "Steve Gerrard"
<no*************@comcast.net> wrote:

<snip>
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>


Good idea, here are some from my snippings file:

www.planetsourcecode.com/vb - Source Code/Tutorials
http://abstractvb.com/default.asp - Source Code/Tutorials
http://www.allapi.net/
www.vbtt.com - Visual Basic Tips and Tricks
www.a1vbcode.com - Source Code/Demos
www.vbexplorer.com - Source Code/Demos/Tutorials
http://website.lineone.net/~mattwilkinson
http://visualbasic.about.com/compute...asic/mbody.htm
http://www.vbip.com
http://www.mvps.org/vbnet/code/comct...ookadvtext.htm
http://vbnet.mvps.org/ Randy Birch - new address
http://www.freevbcode.com/ShowCode.Asp?ID=4322
http://www.thescarms.com/vbasic/FolderSpy.asp
homepage http://www.kingsoft-denmark.com/
Tips & Tricks page http://tips.kingsoft-denmark.com/
http://www.mvps.org/emorcillo/
http://www.vbadvance.com
APIViewer 2004
http://www.activevb.de/rubriken/apiv...viewereng.html
http://www.mentalis.org
http://www.vbaccelerator.com

Jul 17 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.