NoMainWin textbox #m.tb, 10, 10, 100, 25 open "Textbox test" for window as #m #m, "trapclose [quit]" call SetTextLimit hwnd(#m.tb), 5 wait [quit] close #m end sub SetTextLimit TextBoxHwnd, Limit CallDll #user32, "SendMessageA",_ TextBoxHwnd as ulong,_ _EM_SETLIMITTEXT as long,_ Limit as long,_ 0 as long,_ SetTextLimit as long end sub