Re: ByRef very efficient?
Have you tried to benchmark it?
Something tells me the form handle method is quicker.
In the ByRef method the function needs to go and get the form's handle and store it in a variable, where in the form handle method the handle is already a variable.
(someone please correct me if I'm wrong, because I could be)
I don't think it really makes a big difference.
Re: ByRef very efficient?
Does it really matter? Probably not unless you are doing this hundreds of times in a row.
Re: ByRef very efficient?
ByRef only passes an Address... Hense the name By Reference...
And in you second example you are passing ByRef also. ByRef is the default if you do not specify ByVal (By Value) - It pushes the actual value on a stack... Meaning you can change the value and the original will not be affected. With ByRef the original will be affected.
When in doubt, Test it out!!!!