Jump to content

Trackbar ticks to HH:MM:SS (_TickstoTime)


Rad
 Share

Recommended Posts

Im trying to convert my $Hour $Min $Sec to the time returned by _TicksToTime using:

$TrackBar =         GUICtrlCreateSlider(43, 21, 145, 17, BitOR($TBS_BOTH,$TBS_NOTICKS))
GUICtrlSetLimit($TrackBar, _TimeToTicks($Duration[2], $Duration[1], $Duration[0]),0)oÝ÷ Ø;«jب

Now I have 2 questions:

Why is my trackbar locking up?

How do I make it return 00:02:50 instead of 0:2:50 (I dont understand the StringFormat information... lots of big words in there! :whistle:)

Link to comment
Share on other sites

I don't know if that could help you, and there will probably someone who will find a better way to resolve the problem ... but i will suggest a simple If statement

$zerodur2 = ""

If $Duration2 < 10 then
$zerodur2 = 0
Endif
If $Duration2 > 9 then
$zerodur2 = ""
Endif


$zerodur1 = ""

If $Duration1 < 10 then
$zerodur1 = 0
Endif
If $Duration1 > 9 then
$zerodur1 = ""
Endif

This will only add a "0" before your string when it need it (e.g smaller than 9)

Edited by newb_powa'
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...