Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sluggish response in form with RTF controls and timer
Message
 
À
05/06/2006 07:12:52
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01127055
Message ID:
01127381
Vues:
16
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,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform