Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need function to convert check amt to text
Message
 
 
À
18/04/2003 16:25:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00779328
Message ID:
00779351
Vues:
15
John,
Some suggestions:
1. In the Init of the form, add the following code:
THISFORM.NewObject('oNumConverter','num2words','num2words')
2. Add a form-level method that calls:
lparameters tcnumber
THISFORM.textbox2.Value = THISFORM.oNumConverter(tcNumber)
3. Add the following code to the When method of the second textbox:
return .F.
1 gives you form-wide access to the new utility. 2 shows one way of utilitizing it to populate the second textbox. 3 makes it so users can not enter the converted textbox and change it. It is for display purposes only.

Good luck!

>Larry or anyone else,
>
>I downloaded the file and added it to my project.
>
>I am pretty new at this.
>
>I have never added a class to my project before.
>
>My question is How do I use it?
>The instructions are:
>Number to word conversion class with source. Upper limit 100 billion minus 1 (with room for expansion).
>See method zreadme() for readme on this class. Lots of buit-in fault tolerance.
>
>Usage:
>------
> x = newobject('num2words','num2words')
> ? x.currency_us(12343.45) && US $
> ? x.currency_us('12343.45')
> ? x.go(1223) && integer only generic conversion
> ? x.go('1223')
>
>I have a form that has 2 txtboxes.
>User enters amount in currency format.
>I would like to use this new class to create the value for the 2nd textbox.
>Does that make sense?
>Perhaps the 2nd textbox goes away and is replaced by this class?
>What I am asking may not make any sense because I do not understand well enough to know what to ask.
>
>Thanks,
>John
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform