Use reflection to examine the object and get it's properties. Then
manipulate the property via the property decriptor.
dim pdc as
PropertyDescriptorCollection=TypeDescriptor.GetProperties(myControl)
dim pd as PropertyDescriptor = pdc.Find("Location",false)
if not pd is nothing then
'do something to the property here...
end if
--
Bob Powell [MVP]
C#, System.Drawing
September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
"Merlin" <(E-Mail Removed)> wrote in message
news:bm5tiu$lpf$(E-Mail Removed)...
> Hi,
>
> I'm creating a function that looks at every control on a form and changes
a
> property if it exists. I've coded so far to find every control, including
> nested - but how do I determin if a property exists first so that it can
be
> changed. e.g change the TEXT of every control (but not all controls may
have
> a property of TEXT).
>
> Many Thanks.
>
> Merlin.
>
>