Kyan

GUICtrlCreateUpdown() Weird behavior (decimal numbers)

3 posts in this topic

Hey, can someone tell me what I'm doing wrong here?

I'm using 3 "updown" controls to set the desired date, but when it comes to year (4digits) when I change the value it becomes a decimal number

Clean up gui to show the issue:

#include <EditConstants.au3>
$Form1 = GUICreate("Form1", 250, 50)
$input1 = GUICtrlCreateInput(@YEAR, 100, 10, 50, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER,$ES_NOHIDESEL,$ES_READONLY))
$btn = GUICtrlCreateButton("Read",160,10,40,21)
GUICtrlCreateUpdown($input1)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case -3
            Exit
        Case $btn
            MsgBox(0,'',GUICtrlRead($input1))
    EndSwitch
WEnd

Am I doing something wrong?

Thanks in advance


Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Share this post


Link to post
Share on other sites



I don't know why it is default --", thank you very much Tekk :D

#include <EditConstants.au3>
$Form1 = GUICreate("Form1", 250, 50)
$input1 = GUICtrlCreateInput(@YEAR, 100, 10, 50, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER,$ES_NOHIDESEL,$ES_READONLY))
$btn = GUICtrlCreateButton("Read",160,10,40,21)
GUICtrlCreateUpdown($input1,0x0080)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case -3
            Exit
        Case $btn
            MsgBox(0,'',GUICtrlRead($input1))
    EndSwitch
WEnd

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

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