Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sluggish response in form with RTF controls and timer
Message
 
To
05/06/2006 07:12:52
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01127055
Message ID:
01127381
Views:
19
Hi John,

Here is an alternate way of retreiving the text length of the RTF control using Window's messages:
DECLARE Long SendMessage IN WIN32API AS SendMessage_C ;
    Long hwnd, Long msg, String, Long

nLen = SendMessage_C(oRTFControl.hWnd, 1119, REPLICATE(CHR(0),8), 0)
** 1119 = WM_USER+EM_GETTEXTLENGTHEX
Depending on the size of the text, this was 10 to 800 times faster than using LEN(oRTFControl.Text) for me. Also note, that the DECLARE only needs to be called once. So you should not include it in your refresh event.

You may also want to use the SelChange event instead of a timer.

I hope this helps,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform