Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repeating piece of code
Message
From
02/04/2013 09:16:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01569704
Message ID:
01569718
Views:
47
>I know that click method does not allow embedded procedures.
>
>But is there any trick to execute a small piece of code inside the method,
>calling it with Do, or other command ?
>
>It would be very useful because when you write inside a procedure it will not work,
>if inside the procedure there are lines as thisform.command1.click, etc.
>
>
>Moises


You can create new methods on the form, which are like procedures, which allow you to call them wherever you like. Something like:
thisForm.myCustomProcedure()
And you add the code you want there, including parameters, by adding a new method to the form (Form menu -> New Method...) and then putting code there.
Previous
Reply
Map
View

Click here to load this message in the networking platform