Jump to content

Help updating Date Control


Recommended Posts

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
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...