Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8043323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:51:53+00:00 2026-06-05T04:51:53+00:00

I may be being really stupid here, but my brain’s gone blank. I’ve got

  • 0

I may be being really stupid here, but my brain’s gone blank.

I’ve got a slider bar (which uses Int32 values) but I want to use it to select a position in a music song (mm.ss)

I also want to output the value that the slider is displaying in to a label above it, so it’s easier to see what the slider is set to.

Anyone have any suggestions?

I thought of trying to convert the int value in to a decimal then dividing by 60.

I’m doing this in C# by the way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:51:55+00:00Added an answer on June 5, 2026 at 4:51 am

    What does the int value represent? If it’s the number of seconds through the song, you should use:

    TimeSpan time = TimeSpan.FromSeconds(seconds);
    string text = time.ToString(@"mm\.ss");
    

    Using a decimal would be a really bad idea – a format with a number of seconds isn’t the same as a fractional number of minutes. For example, 10.50 minutes as a fractional number of minutes is 10 minutes and 30 seconds, not 10 minutes and 50 seconds, which is what you want as far as I can tell.

    TimeSpan is the natural way of representing a time duration in .NET… which is why that’s the type which supports formatting in minutes and seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, this may be a really stupid question, but I'm obviously missing something here.
CSV has field that is being parsed which may or may not have entries
I have a question that may sound odd, but being somewhat of a newbie,
Now it seems like a really simple question and I may just be being
This may seem a bit odd, but I really need to create a workaround
OK, this may just me being ignorant, but I have the following route in
This may be a dumb question, but I really have no idea and I'm
Being that my C++ isn't that great, this may be a really simple/obvious answer,
This may seem like a really daft question, but what is the reason for
This may be a really simple question, but things I've tried don't seem to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.