On Wed, Oct 10, 2018 at 7:10 PM Ken McGinnis kamcginnis@gmail.com wrote:
The problem is when you have something (more than 50 char) in your clipboard and you ctrl V (paste) in the text box to force the text window to come up - the crazy stuff happens. Something about pasting is different from manually typing.
I would guess the routine checking input string length is KeyPress, and KeyPress is launching the new form?
I wonder if, in effect, pasting is firing KeyPress for each character, so you're triggering the routine repeatedly, which is "blocking something."
How about adding a property to the textbox, say, lStringFull, defaulted to .F. that you flip to .T, on the 50th character, then change the logic at the beginning of the KeyPress to:
if ! THIS.lStringFull && already triggered if len(THIS.Value) >=50 THIS.lStringFull = .T. endif
<do your routine>
endif && already triggered