M
michelqa
Hi,
I'm wondering what is the correct way to build a function to retrieve
properties from an object.
Ex:
public string GetControlProperty(string PropertyName)
{
// this function must return the specified propertyName from the
control object.
int Hwnd=66666; // handle is already set somewhere else ;o)
ctl = Control.FromHandle(Hwnd);
return ctl.[*PropertyName*];
}
Calling example :
GetControlProperty("Text") will return the text of the object.
Note : in my example the property returned is always a string but this
will not be the case.
Thanks for any help...
I'm wondering what is the correct way to build a function to retrieve
properties from an object.
Ex:
public string GetControlProperty(string PropertyName)
{
// this function must return the specified propertyName from the
control object.
int Hwnd=66666; // handle is already set somewhere else ;o)
ctl = Control.FromHandle(Hwnd);
return ctl.[*PropertyName*];
}
Calling example :
GetControlProperty("Text") will return the text of the object.
Note : in my example the property returned is always a string but this
will not be the case.
Thanks for any help...