Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a Form From An External Program
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00747361
Message ID:
00748301
Views:
27
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform