ZeroEffect Posted March 26, 2009 Posted March 26, 2009 for some reason I am having a mental block. All I am trying to do is format the current position in media player to have tenths of a second using the current position on mediaplayer, timeserial, and format. I get everything I want except the tenths of a second. mpPlayer.CurrentPosition returns 27.5472404 TimeSerial(0, 0, mpPlayer.CurrentPosition) returns 12:00:31 AM Format(TimeSerial(0, 0, mpPlayer.CurrentPosition), "m:ss.f") returns 0:31.0 but it is always .0 Any suggestions on how can I get tenths of a second? Thanks ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
ZeroEffect Posted March 26, 2009 Author Posted March 26, 2009 I am currently working with this but I seem to be missing something. TempData = Format(TimeSerial(0, 0, mpPlayer.CurrentPosition), "m:ss.") &_ Format(mpPlayer.CurrentPosition - Int(mpPlayer.CurrentPosition), "f") This returns 0:00.0.00 not 0:00.0 thanks for any thoughts you may have, ZeroEffect Quote If you can't find it, Build It. There is no place Like 127.0.0.1 also don't forget 1 + 1 = 10
stumper66 Posted March 29, 2009 Posted March 29, 2009 How about this: ' mpPlayer.CurrentPosition = 27.5472404 Dim CurrentPosition As String = String.Format("{0:0,#}", mpPlayer.CurrentPosition) ' Will Display as 27.5 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.