Results 1 to 5 of 5

Thread: Trouble with slider control......

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    Trouble with slider control......

    I will first start by saying I hate the Standard slider control, but it's all I can use since I have VB LE. My problem is this:

    I'm making a slider to control the song progress slider in winamp. So before I play the file I set the slider1.max = GetSongLength.

    The problem with this is, the song length is like 202.345 seconds, and the slider won't accept decimals. So I need to round off to like 202 seconds. I tried:

    slider1.max = format(GetSongLength, "###")

    but that doesn' t seem to work. How can I round this off? Thanks

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. MsgBox Round(202.345)
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2001
    Location
    Maumelle, AR
    Posts
    624

    Still not working...

    The following still gives error "Invalid Property Value"
    VB Code:
    1. slider1.value= round(getsonglength)

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. Dim ROUNDED As Double
    2.    
    3.     ROUNDED = Round(202.345)
    4.    
    5.     Slider1.Value = ROUNDED
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Slider1.Max = Round(doodah,0)
    or
    Slider1.Max = Int(doodah)
    or etc etc

    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

Posting Permissions

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



Click Here to Expand Forum to Full Width