Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Way to limit width of messagebox?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01314437
Message ID:
01314488
Vues:
13
Thanks Sergey,

I was sure I had done something like this in the past but couldn't find the code for reference anywhere.

Thanks for your help!

Rodd

>>Is there any way to limit the width of a messagebox? In other words, if I pass a rather long message as the message text, rather than the messagebox stretching out the width of my screen, I'd like it to display only about 70 characters per line and do wordwrap on anything longer.
>>
>>Is there any kind of function or routine that will take a string and add the chr(10) + chr(13) at the right places to give you a "text-wrapped" string to pass to Messagebox()?
>
>
>lcText = "Is there any way to limit the width of a messagebox? " + ;
>			"In other words, if I pass a rather long message as the message text, " + ;
>			"rather than the messagebox stretching out the width of my screen, " + ;
>			"I'd like it to display only about 70 characters per line and do wordwrap on anything longer."
>
>lnMemowith = SET("Memowidth")
>SET MEMOWIDTH TO 70
>lcNewText = ""
>FOR i=1 TO MEMLINES(lcText)
>	lcNewtext = lcNewText + MLINE(lcText,i) + CHR(13)
>ENDFOR
>lcNewtext = LEFT(lcNewtext, LEN(lcNewtext )-1)
>SET MEMOWIDTH TO (lnMemowith)
>MESSAGEBOX(lcNewtext )
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform