Jump to content

Limit the number of characters in a GUI Input


lyledg
 Share

Recommended Posts

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

Global $EM_LIMITTEXT = 0xF0C5
DLLCall("user32.dll","long","SendMessage",_
            "hwnd",$HWND,_
            "int",$EM_LIMITTEXT,_
            "int",10_
            "int,0)

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

GUISendMsg($ctrlID,$EM_LIMITTEXT,10,0)

Lar.

<{POST_SNAPBACK}>

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)
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlCreateLabel ("To:", 150,500,20,20,)
GLOBAL $TIME2 = GUICtrlCreateInput ("",175,500, 80, 20,0x2000)
GUICtrlSetState(-1,$GUI_DISABLE)
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...