Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run a method from an invisible form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00669891
Message ID:
00669909
Vues:
16
When you call the form, use the NOSHOW option in the DO FORM command. The NOSHOW sets the form's visible=.f.

DO FORM MyForm NAME oMyForm NOSHOW
oMyForm.MyButton.Click()
oMyForm.Release()

In the form that you do not want to display, just set it's Visible property to .f. (false). You still have control of the form but the user just doesn't see it.

>Hi.
>I have a form which allows Invoices for customers to be printed.
>There is a button on this, which selects all Invoices waiting to be printed, does some formatting,copies data to a temporary file, and then prints the Invoice. (I run this from a menu by : Do form InvForm)
>
>I now want to put a button on my Customer Transaction Screen, which, if selected, prints just the one Invoice.
>
>In that all the work has already been done in my InvForm, I wonder is the following feasible:
>
>From my Customer screen have a button that says Print Highlighted Invoice and does following:
>
>1. Loads up InvForm (But makes it invisible)
>2. Sets a few properties of the form to say I am printing ONE Inv only
>3. Runs the code on the Selct and Print Buttons of the form
>4. .... the Printer dialogue should come up
>5. Unloads the InvForm
>
>I am trying to use my exisitng InvForm and methods but do it in the background.
>
>Is this feasible and I'd appreciate any pointers ?
>
>regards,
>
>Gerard
>
>1.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform