Sign in to follow this  
Followers 0
Uncle Argyle

Help updating Date Control

3 posts in this topic

Hi,

I cannot update a date control with my script below...anyone have any thoughts?

Thanks in advance,

Mike.

#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

$DTM_SETFORMAT = 0x1005
$style = "MM-dd-yyyy"

$Form1 = GUICreate("Test", 200, 100, -1, -1)

$Button1 = GUICtrlCreateButton("Update",75,60,50,21)
$Date1 = GUICtrlCreateDate("", 50, 20, 100, 21)
GuiCtrlSendMsg($Date1, $DTM_SETFORMAT, 0, $style)

GUISetOnEvent($GUI_EVENT_CLOSE, "exitapp")
GUICtrlSetOnEvent($Button1, "Update")

GUISetState(@SW_SHOW)

While 1
    Sleep(100)
WEnd


Func Update()
    GUICtrlSetData($Date1, "02-10-1990")
EndFunc

Func exitapp()
    Exit
EndFunc

Share this post


Link to post
Share on other sites



GUICtrlSetData($Date1, "1990/02/10")


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

GUICtrlSetData($Date1, "1990/02/10")

Excellent, thanks! I was assuming that I had to update the date with the format style I had set.

I really appreciate the help!

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