>Good afternoon all,
>
>Can I call a function in a .prg file from a command button on a form, or should call it as a procedure from proc_library.prg. It is my shutdown procedure.
>
>Perry
Perry,
As long as the prg/proc/function/method/event etc is visible you can call it.
* Click code
1) You have a prg named myshutdown
myshutdown()
2) Your proc file has it
myshutdown()
3) Your custom class has a method
set classlib to myCustom additive
oProcs = createobject("myProcs")
oProcs.myshutdown()
4) Your form has the method
thisform.myShutdown
BUT, this is a shutdown procedure so be better not called from a button but from main proc after "read events".
*Main.prg
*Startup-setup code
read events && Start event processing
myCleanUp() && This would run after a "clear events" is seen
quit
function myCleanUp
...
Cetin