Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone know whats wrong with this?
Message
De
07/08/2000 19:18:13
 
 
À
07/08/2000 19:08:16
Brent Knight
Progressive Impressions International
Bloomington, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00401997
Message ID:
00402003
Vues:
21
>I have a form (frmconfirmations) that calls a .prg. From this program I want to set the form to maximized. Here is my code.
>
>
>Frmconfirmations.WINDOWSTATE = 2
>set defa to j:\gel\code
>REPORT FORM &uniqrpt NEXT 1 TO PRINT PREVIEW
>IF (MESSAGEBOX("Now do you want to print the confirmation?",36,"Print the confirmation?") = 6)
>frmconfirmations.WINDOWSTATE = 0
>REPORT FORM &uniqrpt NEXT 1 TO PRINT NOCONSOLE
>
>I set the defa to the folder that the form is in. But I get an error that says "Object frmconfirmations is not found"
>
>How should I try to change the form??

You have to pass the .PRG a reference to the form; you've assumed that there's a variable corresponding to the form matching the form's name that's in scope (both assumptions are invalid unless you've taken steps to ensure that they are true):

* In the form that calls the .PRG:
DO MyPrg WITH thisform

*MyPrg.PRG
LPARAMETERS toCallingForm
toCallingForm.WindowState = 2
*
* blah, blah, woof, woof
*
toCallingForm.WindowState = 0
*
* woof, woof, blah, blah
*
RETURN

It has nothing to do with the path, and everything to do with having a valid object reference to the form.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform