Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a Form From An External Program
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00747361
Message ID:
00748301
Vues:
28
>This is where I come unstuck. I have no idea how to create a free standing method and how to call it (my background is FPW26 procedural code)
>Could you please help with a small example.
>Thank you for your help

John,
In your main program of the exe create a procedure something like:-
Procedure DoForm
Lparameters lcForm, tcParam1
Local lnParams, lcFormName

	lnParams = Pcount()
	lcFormName = "frm"+lcForm
	DO case
		Case Wexist(lcFormName)
			DO ActivateIt with lcFormName
                           * This just activated a form if it already exists.
		Case lnParams = 1
			DO form (lcForm)
		Case lnParams = 2
			DO form (lcForm) with tcParam1
	EndCase
Return
You can then call this from your other program
do DoForm with FormName
As long as the DoForm method and the form you are trying to display are compiled into the same exe then this should work.
HTH
Caroline
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform