Jump to content
Sign in to follow this  
Andreik

Date control problem

Recommended Posts

Andreik

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
kaotkbliss

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
somdcomputerguy

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
Andreik

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
somdcomputerguy

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.