|
 |
|
06-01-2004, 10:51 PM
|
#1
|
|
Clover
Join Date: May 2004
Location: Arkansas
Posts: 1,549
|
skinning vb listbox?
does anyone know how I could make a nice listbox for say a playlist that I can skin easily in vb6...like frodoplayer's list looks?
should i try to do an array of labels or pictureboxes?
thanks!
Last edited by Grayscale; 06-01-2004 at 10:58 PM.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
06-02-2004, 03:35 AM
|
#2
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
|
If anyone knows please tell me also. I had a go at programming my own, it works basically - it doesn't have scroll bars.
I have attached my basic project. If there are any activex guru's or who could tidy it up and make it work effectively, would be much appriciated.
__________________
We are, will have and forever will be...
But not tommorrow!
|
|
|
06-02-2004, 03:44 AM
|
#3
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
AlienEclipse,
When you move the Scrollbar, you need to set the ListOffset = (tmpValue/100) * TotalListItems then call a procedure which will move the list to that section.
It will actually be MUCH easier on the coding to have a procedure which moves to a certain point (you pass the value you wish to show as a parameter) and you call that whenever you do a Page Up/Page Down or a Up/Down, and also on the timers, as it will save you quite a bit of code, and will tidy it up a bit
Garry
|
|
|
06-02-2004, 04:17 AM
|
#4
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
|
Cheers, i will look into that for the scrolling. That app was just a test, i did actually make procedures when i implimented into my main app. But thanks again for scrolling advice. Any advice on making it an activex control?
__________________
We are, will have and forever will be...
But not tommorrow!
|
|
|
06-02-2004, 04:18 AM
|
#5
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
Aww heck, i've hacked together a procedure to enable to scroll bar to work  The bits added are the JumpTo procedure, and a couple of lines in the image_move section to tell it what number to go to
Source code is attached
Garry
|
|
|
06-02-2004, 04:20 AM
|
#6
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
Just seen your reply...no idea how it could be made into an ActiveX control...i've never touched ActiveX before
Garry
|
|
|
06-02-2004, 05:28 AM
|
#7
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
|
Sweeeet!! Thanks for that. Works great, but now i have to get the jump to to work for when it changes to the next track like in shuffle mode. i would like it so the next track would be highlighted in the middle of the list and take in to consideration if it is one of the first or last tracks in the list.
If any other developers wish to contribute something to this little project, i'm sure we could all benefit.
Nothing in life is simple, but thats the fun. There would be no point in living otherwise.
__________________
We are, will have and forever will be...
But not tommorrow!
|
|
|
06-02-2004, 05:37 AM
|
#8
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
That is pretty simple. All you need to do is call the JumpTo procedure with the number of the item it's currently playing (minus half of the Label1.caption value) and then set the selection box to that number (pretty easy as you're using indexes, right?)
Give me a few mins, i'll see if I can put in a text box that you can enter a number and get it to jump to it
I'll post back shortly
Garry
|
|
|
06-02-2004, 05:54 AM
|
#9
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
|
Yeah it was easy, i got it to work and it updates the scroll bar also. now just have to take into account if the value is to low or to high to display in the middle.
__________________
We are, will have and forever will be...
But not tommorrow!
Last edited by AlienEclipse; 06-02-2004 at 06:03 AM.
|
|
|
06-02-2004, 06:13 AM
|
#10
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
AlienEclipse,
Put this in your procedure for jumping to/displaying a certain thing:
Code:
tmpVal = Text1.Text - Int(Label1.Caption / 2)
If tmpVal < 1 Then tmpVal = 0
If tmpVal > (TotalListItems - Label1.Caption) Then tmpVal = (TotalListItems - Label1.Caption)
JumpTo (tmpVal)
Picture2.Move 0, ((Text1.Text / TotalListItems) * (Picture1.Height - Picture2.Height))
shpSelected.Top = (shpSelected.Height * (Text1.Text - ListOffset - 1))
Edit: Source code with this addition attached, makes it easier for others should they wish to use this as background for another app.
Garry
Last edited by Confused; 06-02-2004 at 06:17 AM.
|
|
|
06-02-2004, 06:33 AM
|
#11
|
|
Variable Bitrate
Join Date: Jul 2003
Location: Dunedin - New Zealand
Posts: 425
|
F'ing Sweeeet, it works great. You have out done yourself Confused. Thanks a great deal, now i can move on with other important parts of my project.
GreyScale i hope this helps you for your project. I'm sure it will help a lot of other developers in their projects.
__________________
We are, will have and forever will be...
But not tommorrow!
|
|
|
06-02-2004, 02:40 PM
|
#12
|
|
Constant Bitrate
Join Date: May 2004
Location: Sweden
Posts: 151
|
|
|
|
06-02-2004, 03:17 PM
|
#13
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
Quote: Originally Posted by Jeep
Unfortunately you have to pay for those...and why bother paying when myself and AlienEclipse have basically provided all the code/know-how for FREE!
Garry
|
|
|
06-02-2004, 06:33 PM
|
#14
|
|
Clover
Join Date: May 2004
Location: Arkansas
Posts: 1,549
|
i love you guys *tears rolling* you guys are so f'ing awesome its not even funny!
|
|
|
06-03-2004, 02:04 AM
|
#15
|
|
Constant Bitrate
Join Date: May 2004
Location: Sweden
Posts: 151
|
some good things in life you have to pay for...
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:31 AM.
| |