mardi 12 juillet 2022

How to set or get Button1.FlatAppearance.BorderColor with reflection

How can I use Reflection to set or retrieve the FlatAppearance.BorderColor property of a Button object? Experiments with VB code ...

'MyObject refers to an existing Button object

Dim MyType As Type = MyObject.GetType

Dim MyPropertyInfo As PropertyInfo

PropertyInfo = MyType.GetProperty("FlatAppearance.BorderColor")

But above VB code fails and gives nothing back





Aucun commentaire:

Enregistrer un commentaire