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.
That is exactly right.
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?
From a maintenance stand-point, if you have other people working on your code, if you all follow the convention that all methods go on the outermost container, you do not have to waste time hunting around all the objects on the form to find where the code is.
Seeing a line of code that says Thisform.DoValidationRoutine is more self-documenting that Thisform.command1.click().
What happens if you change the name of the command button or for some reason remove it later? All your code breaks.
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