|
Post by lpjackpot on Jan 14, 2019 2:33:30 GMT -5
Trying to catch back up with LB, been out of it for awhile. Can anyone refresh my memory on how to limit the maximum number of characters that can be entered in a text-type input.
example: Name, address, I looked around the help menu but had no luck.
Thanks,
LP
|
|
|
Post by metro on Jan 14, 2019 7:18:25 GMT -5
Thanks to Alyce this is the only way I know
NoMainWin Textbox #1.t, 10,10,150,24 Statictext #1.s, "",10,50,200,200 Open "Textbox - Limit Input" For Window_nf As #1 #1 "trapclose [quit]" #1.t "!setfocus" #1.s "Try to type more than 10 characters!" hText = hWnd(#1.t) flag = _EM_LIMITTEXT Call SendMessageLong hText,flag,10,0 Wait [quit] Close #1:End Sub SendMessageLong hWnd,msg,wParam,lParam CallDLL #user32, "SendMessageA",_ hWnd As Long, _ msg As Long,_ wParam As Long,_ lParam As Long,_ re As Long End Sub
|
|
|
Post by Rod on Jan 14, 2019 7:39:54 GMT -5
|
|
|
Post by lpjackpot on Jan 15, 2019 0:12:14 GMT -5
Thank you both for the updated info. been awhile since i had a chance to get back into LB. I'm excited.....
|
|