Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling functions??
Message
From
10/08/1998 13:43:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00125333
Message ID:
00125337
Views:
13
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform