Hi,
My problems,
current track time in hscrollbar1.Value
My Code:
private void timerTrack_Tick(object sender, EventArgs e)
{
long pos = Bass.BASS_ChannelGetPosition(_stream); // position in bytes
long len = Bass.BASS_ChannelGetLength(_stream); // length in bytes
_tickCounter++;
if (_tickCounter == 5)
{
// display the position every 250ms (since timer is 50ms)
_tickCounter = 0;
double totaltime = Bass.BASS_ChannelBytes2Seconds(_stream, len); // the total time length
double elapsedtime = Bass.BASS_ChannelBytes2Seconds(_stream, pos); // the elapsed time length
double remainingtime = totaltime - elapsedtime;
//statusBar1.Text = String.Format("Elapsed: {0:#0.00} - Total: {1:#0.00} - Remain: {2:#0.00}", Utils.FixTimespan(elapsedtime, "MMSS"), Utils.FixTimespan(totaltime, "MMSS"), Utils.FixTimespan(remainingtime, "MMSS"));
this.textBox2.Text = String.Format("{0:#0.00}", Utils.FixTimespan(elapsedtime, "MMSS"));
this.textBox3.Text = String.Format("{0:#0.00}", Utils.FixTimespan(totaltime, "MMSS"));
//this.TxtRemain.Text = String.Format("Remain: {0:#0.00}", Utils.FixTimespan(remainingtime, "MMSS"));
ERRORE:--->> this.hScrollBar1.Value = pos;
}
}
Impossible convert to method long in int.
solution?.
thanks!