|
-
Jan 24th, 2000, 02:55 AM
#1
I have an app that has a slidder bar in it. I have everything design in graphics or a color of some sort. And this darn slidder bar is still using my system colors, so it makes my program look cheezy. I want to be able to change the color to the slidder bar. Any ideas? It's NOT a scrollbar as I have tried that function to change the color, but nothing came of it.
Any ideas?
------------------
John T. Mieske
Star Trek LCARS programmer
Knight Vision Enterprises
[email protected]
-
Jan 24th, 2000, 03:53 AM
#2
So Unbanned
well!!!! you could make a slider invisible and a grahpic and then ya know make a scalewidth = the the max value of the slider then use a little coding to move a grahpic across a line...!
Hope I helped?
------------------
DiGiTaIErRoR
-
Jan 24th, 2000, 04:42 AM
#3
This will change the Main Color of the ScrollBar(s)..
In a Module..
Code:
Option Explicit
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Public Const GWL_WNDPROC = (-4)
Private Const WM_CTLCOLORSCROLLBAR = &H137
Public lPrevWnd As Long
Public Function SubWndProc(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim lBrush As Long
If Msg = WM_CTLCOLORSCROLLBAR Then
'Change the ScrollBar Color
lBrush = CreateSolidBrush(vbBlue)
SubWndProc = lBrush
Exit Function
End If
SubWndProc = CallWindowProc(lPrevWnd, hwnd, Msg, wParam, ByVal lParam)
End Function
In the Form..
Code:
Private Sub Form_Load()
lPrevWnd = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf SubWndProc)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call SetWindowLong(hwnd, GWL_WNDPROC, lPrevWnd)
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Jan 24th, 2000, 05:43 AM
#4
Hey Aaron, This doesn't work with a Slidder Bar. I tried (Unless I did it wrong). Any other ideas? Thanks for the help though.
Hey DiGiTaIErRoR,
I thought about that.. but wasn't sure if the scale would work or not. Have you tried it? If so, can you post me an example? It would have to have code to drag that gif up and down correct? got an example of how to do that? 
Knight
[This message has been edited by Knight_Vision (edited 01-26-2000).]
-
Jan 25th, 2000, 09:27 PM
#5
Hey Aaron or anyone else who might know.. This code that was supplied by Aaron didn't work. Any other suggestions ? Or am I doing it wrong?
Knight
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|