Results 1 to 3 of 3

Thread: double to int

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    double to int

    I've got this programme that plays sounds. I have an integer that i have to assign the value of this.adio.Duration;

    Audio adio;
    Video vdeo;


    VB Code:
    1. int second;
    2.    int total;
    3.    total = this.adio.Duration;
    4.    trackBar1.Maximum = this.adio.Duration;
    5.    trackBar1.Value = total;
    6.    lblCurrentduration.Text = total.ToString();
    7.    trackBar1.Enabled = true;
    8.    
    9.    if (trackBar1.Value == trackBar1.Maximum) {
    10.      adio.Stop();
    11.      play();
    12.    }
    13. fix: ;

    how can i change the adio.Duration to an integer.

  2. #2
    New Member
    Join Date
    Nov 2005
    Posts
    13

    Re: double to int

    integer = Convert.ToInt32(adio.Duration);

  3. #3
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: double to int

    Quote Originally Posted by RFKevdog
    integer = Convert.ToInt32(adio.Duration);
    the Convert.Int32(adio.Duration) method uses int.Parse(adio.Duration).
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

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