Scrollbar

Aleksandra

Registered User.
Local time
Today, 23:23
Joined
Jul 15, 2006
Messages
12
Hi!

Is there any opportunity to paint a standard ScrollBar?

Thanks a lot!

Aleksandra
:)
 
If you mean change a scroll bar colors? The answer is simply no.
 
ssteinke said:
If you mean change a scroll bar colors? The answer is simply no.
Thank You very much for your answer...
Yes, I mean to change a scrollbar colors...
But if to use API function?
I have found InitializeFlatSB and FlatSB_SetScrollProp functions, but I do not know how to use it... I work with Access only two months...:confused:
 
Aleksandra,

whether or not you use an API (assuming there is one), you'll still need to understand VBA code and how to adapt / implement / rewrite it to your application.
You'll have to sort that out yourself.

There are no simple examples neither can you easily implement any samples within 5 seconds and off you go ;)

Get yourself more familiar with VBA, give it a go (will take quite some time) and come back if you get stuck somewhere along the long and windy road.

RV
 
RV said:
Aleksandra,

whether or not you use an API (assuming there is one), you'll still need to understand VBA code and how to adapt / implement / rewrite it to your application.
You'll have to sort that out yourself.

There are no simple examples neither can you easily implement any samples within 5 seconds and off you go ;)

Get yourself more familiar with VBA, give it a go (will take quite some time) and come back if you get stuck somewhere along the long and windy road.

RV
:) Dear RV,
I understand a little bit VBA code....

With API I have alreeady tried this:
Code:
Option Explicit

      Private Declare Function SetSysColors Lib "user32" (ByVal nChanges _
         As Long, lpSysColor As Long, lpColorValues As Long) As Long
      Private Declare Function GetSysColor Lib "user32" (ByVal nIndex _
         As Long) As Long

       Dim OriginalColor As Long
      Dim NewColor(0) As Long
      Dim IndexArray(0) As Long

      'Constant for screen aspects.
      Private Const COLOR_BTNFACE = 15

Private Sub Command1_Click()
         'Specify the aspect being changed.
         IndexArray(0) = COLOR_BTNFACE

         'Randomly pick a new color.
         NewColor(0) = QBColor(Int(Rnd * 16))

         'Inform windows of the new color setting.
         SetSysColors 1, IndexArray(0), NewColor(0)
      End Sub
but this code change all system colors...

I also tried:
Code:
Declare Function FlatSB_SetScrollProp Lib "comctl32"_ 
(ByVal hWnd As Long, ByVal index As Long, ByVal newValue As Long, ByVal_
fRedraw As Boolean) As Boolean
but I do not know, how to change not only Backgraund color, but all...

Aleksandra
 
Hello Aleksandra,

your Windows settings control the color of your scrollbar.
Although it seems that you use API's to change the color, I strongly advise you not to mess with settings.
See Ken's reply in this link why you shouldn't mess with settings:

http://www.utteraccess.com/forums/showflat.php?Cat=&Board=8&Number=1143331

That leaves you with two options:

OPTION 1

Use the sample as per Leban's site.
The customized scrollbar is made up by command buttons.
You could create a picture in a specific color, save it an put it as an embedded picture onto the commands.

OPTION 2

Leave it for what it is (that's the best option ;)

RV
 
RV said:
Hello Aleksandra,

your Windows settings control the color of your scrollbar.
Although it seems that you use API's to change the color, I strongly advise you not to mess with settings.
See Ken's reply in this link why you shouldn't mess with settings:

http://www.utteraccess.com/forums/showflat.php?Cat=&Board=8&Number=1143331

That leaves you with two options:

OPTION 1

Use the sample as per Leban's site.
The customized scrollbar is made up by command buttons.
You could create a picture in a specific color, save it an put it as an embedded picture onto the commands.

OPTION 2

Leave it for what it is (that's the best option ;)

RV
Hello RV,
Thank You very much for your answer... Yes, I do understand, that way to change all system colors is bad...
But how about API Function InitializeFlatSB and FlatSB_SetScrollProp ?
With this it is possible to change standard ScrollBar in one form...

Aleksandra
 
Hello Aleksandra,

I don't even know what API stands for ;)
Can't help you.
Perhaps somebody else can.

Take into account that, assuming the code you found (where did you get it from?) works, it will impact all scrollbars in Windows based applications (amongst which Word and Excel, to mention a few).
My point still stands, do NOT, I repeat, do NOT use API's for your purpose.
Use Leban's approach instead.

Good luck.

RV
 

Users who are viewing this thread

Back
Top Bottom