Jump to content
Sign in to follow this  

Limit the number of characters in a GUI Input

Recommended Posts


How do you limit the amount of characters that can be typed into the GUIcreateinput box? I am wanting to allow only 4 numbers in this function, and have created the GUI Input with the (ES_NUMBER 0x2000), value


Share this post

Link to post
Share on other sites

create the input... get it's $HWND and

Global $EM_LIMITTEXT = 0xF0C5

EDIT: oh, wait... There is probably a GUISendMsg() equivilent...




Uh...Larry sorry for the ignorance...But how do I get the Window handle of a GUI input box?

Not sure how to go about this

My code for the two input boxes I want to limit the amount of characters for are as follows:

GLOBAL $TIME1 = GUICtrlCreateInput ("", 65, 500 , 80, 20,0x2000)
GUICtrlCreateLabel ("To:", 150,500,20,20,)
GLOBAL $TIME2 = GUICtrlCreateInput ("",175,500, 80, 20,0x2000)

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.