>I want to click button that has caption "Mango".
>How is it possible programatically?
>
>In addition to what Hilmar has told you, it is much better programming practice to code in methods, not events. What this means is that you really should create a custom form method and call that method from the click of the command button and anywhere else you need to execute the code.
Let's say that I have a button on the form which runs a validation routine. I really need to have that routine run at least once every hour. So I add a form property ValidationLastRunTime and put code to reset that property in the button click() event. Then I add a timer control which compares current time with last run time and executes button.click() if needed.
I think you are saying that it would be better practice to move all the code from button.click() into a custom form method and have both the button and the timer call that method.
If not, could you please explain what I've missed?
If so, I don't doubt your assertion, but I also don't see any practical difference. Could you explain what makes this better coding practice?
Thanks..........Rich
Previous
Next
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