Sign in to follow this  
Followers 0
Andreik

Date control problem

5 posts in this topic

#1 ·  Posted (edited)

Check this code. It should change the time from control after 5 seconds but isn't change anything. What is wrong here?

$MAIN = GUICreate("Test",300,186)
GUISetBkColor(0xC0E0FF,$MAIN)
$TIME = GUICtrlCreateDate("",40,30,150,30,BitOR(0x20,0x09,0x01))
GUISetState()
Sleep(5000)
GUICtrlSetData($TIME,"18:05:11")
Sleep(5000)
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites



Let's step through the code...

You create your gui

You set your time variable

you sleep for 5 seconds

then display the variable you set 5 seconds ago


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

Change this GUICtrlSetData($TIME,"18:05:11") to GUICtrlSetData($TIME, @YEAR & "/" & @MON & "/" & @MDAY & " 18:05:11")


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Change this GUICtrlSetData($TIME,"18:05:11") to GUICtrlSetData($TIME, @YEAR & "/" & @MON & "/" & @MDAY & " 18:05:11")

Thanks, it works.

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Thanks, it works.

You bet. :mellow:

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
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
Sign in to follow this  
Followers 0