General information
Category:
Coding, syntax & commands
>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.
I'm not exactly sure what you're asking, but in general the right way to handle a piece of code that you need several places is to create a custom method at the appropriate level and call it where you need it.
So, if you'll need this code in a number of different command buttons, add it as a custom method to your button class. If you'll need it from a number of different places in a single form, add it to the form. If you'll need it in a number places in a number of forms, add it to a form class. If you'll need it throughout your application, add it to your application class.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only