>Thanks again for your help and offer. It's an honor to be able to get professional tips, techniques and solutions from the FOXPRO guru! I think I'll take advantage of it ... right now!
>
>I came straight from Foxpro 2.6 for DOS to Visual Foxpro, so I get lost at times when I try to incorportate some things into Form. In the DOS version, I was able to include procedures and functions in the "clean-up" section for the form, however, in Visual Foxpro I'm not sure where to include the actual procedures (i.e., the procedure name, codes, etc). At this point, I open a procedure file in the Load Method/(Event?) so that the command buttons and other controls on the form can call those procedures and functions. Is there a "place" where I can include these "snippets"?
>
> Thanks,
>
> Glenn
Hi Glenn,
As usual in FoxPro, there are a number of ways to handle this. If the procedure in question is used by several forms, then open the procedure file in your main program with
SET procedure to MyProg ADDITIVE
If the functions will only be used by ONE form, then cut and paste the code into a custom method. If you haven't done this, it's easy. Open your form in design mode, then look at the FORM menu bar. One choice will be NEW PROPERTY, another will be NEW METHOD. Pick NEW METHOD, give it a name and save. Go to your form, open the method like any other method (Click, INIT, etc.) You'll find it at the bottom of the list of methods/events. Paste in your code, double checking for variable changes, etc.
As for cleanup, if you click on the X at the top right (Win95) or bar at the top left (Win3.1x) the form calls QueryUnload. In that method you can insert a call to YOUR methods:
if thisform.MyCleanup()
return .f.
else
return .t.
endif
where MyCleanup is your method.
HTH
Barbara
PS I'm answering this so *I* can come to Hawaii to consult also - BHP