Bill Kressbach wrote:
> It's a prg file which sets up variables and contains procedures. It then
> calls the main form which contains a grid and a few controls. There is also
> one sub-form that is called from time to time.
>
> Bill
>
So if I understand you right, the variables declared in the PRG are
referenced in the form, and you want the form to be able to call the
procedures/functions in the PRG.
My advice:
- call/instantiate your form in your PRG
- you should be able to reference those procedures/functions from
anywhere in your form then as they're still in the public/global scope
at that point
- make sure to take advantage of passing OBJECTS so that you
encapsulate the functionality and not too tightly couple your forms to
the generic procedures/functions....iow, don't reference the forms
explicitly in your generic procedures/functions but rather call them
from the form using a THIS reference.
**Main.prg
public oUtils, oApp, oGodShesNude
do form MyForm
return && end of regular program
procedure SomeProcedureInMyMainPRG(toObj as Object)
** you can pass the form reference to your generic subroutines
endproc
* -- end of prg
** MyForm.pageframe1.page1.cmdDoSomething.Click
SomeProcedureInMyMainPRG(thisform)
Does that make sense to you?
--
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.