I want to refer to use a function for referring to a control something like this:
functionname("cmdbutton1").height=32
this should set the height of the command button named "cmdbutton1" to 32. Does anyone know how to do this?
Printable View
I want to refer to use a function for referring to a control something like this:
functionname("cmdbutton1").height=32
this should set the height of the command button named "cmdbutton1" to 32. Does anyone know how to do this?
I think you are going to have to explain what it is you are trying to do a little better. You want to function to return a control if you pass in the name? Are you talking about on the same form?
you can say
public functionname(mycontrol As Button, Height as integer) as blah
but you cant give functions properties...
Although something like this may work:
functionname(controlname as string) as control
Which then you could use the .height after it to work with the control it returned without another variable, but its kind of ugly.