Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: skinning vb listbox?

  1. #1
    Clover Grayscale's Avatar
    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!

  2. #2
    Variable Bitrate AlienEclipse's Avatar
    Join Date
    Jul 2003
    Location
    Dunedin - New Zealand
    Posts
    424
    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.
    Attached Files Attached Files
    We are, will have and forever will be...
    But not tommorrow!

  3. #3
    Raw Wave Confused's Avatar
    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
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  4. #4
    Variable Bitrate AlienEclipse's Avatar
    Join Date
    Jul 2003
    Location
    Dunedin - New Zealand
    Posts
    424
    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!

  5. #5
    Raw Wave Confused's Avatar
    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
    Attached Files Attached Files
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  6. #6
    Raw Wave Confused's Avatar
    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
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  7. #7
    Variable Bitrate AlienEclipse's Avatar
    Join Date
    Jul 2003
    Location
    Dunedin - New Zealand
    Posts
    424
    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!

  8. #8
    Raw Wave Confused's Avatar
    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
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  9. #9
    Variable Bitrate AlienEclipse's Avatar
    Join Date
    Jul 2003
    Location
    Dunedin - New Zealand
    Posts
    424
    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.
    Attached Files Attached Files
    We are, will have and forever will be...
    But not tommorrow!

  10. #10
    Raw Wave Confused's Avatar
    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
    Attached Files Attached Files
    Co-Developer of A.I.M.E.E
    www.aimee.cc

Page 1 of 3 123 LastLast

Similar Threads

  1. developing in VB
    By ShinkunoNamida in forum Software & Software Development
    Replies: 17
    Last Post: 07-27-2008, 11:13 AM
  2. Using VB to search and play a track in Winamp
    By deadweasel in forum Software & Software Development
    Replies: 23
    Last Post: 01-26-2004, 07:25 PM
  3. Writing a skinable VB App.
    By johnram in forum Software & Software Development
    Replies: 2
    Last Post: 09-16-2003, 05:35 PM
  4. Developing a VB app with IR input???
    By mp3stang02 in forum Software & Software Development
    Replies: 8
    Last Post: 08-26-2002, 01:42 AM
  5. VB and MediaPlayer
    By hvymetal in forum Software & Software Development
    Replies: 3
    Last Post: 10-05-1999, 12:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •