S
SomeNewDev
Hi,
I've got problems accessing some properties of buttons on my own toolbar in
Visio. Mainly I really need to change the 'Enabled' property of some buttons
(depending on specific states, which are changing at runtime).
I tried both.. creating/refering to them as "Office.CommandBars"-objects and
as "Visio.UIObject"-objects aswell. Both ways of using custom buttons in
Visio are just working fine. But they both start working weird, when it comes
to changing their properties at runtime.
For example the 'Enabled' property: Sometimes accessing it results in an
exception (via Office.CommandBars).. sometimes I can change it, but the state
doesn't update in Visio anyway (Visio.UIObject).
And yes.. I AM keeping them at a class level, that they aren't collected by
the GC at runtime. Again.. everything works fine with them, inspite of
changing their properties like 'Enabled' at runtime.
I'm doing the same in Excel, PowerPoint, MSProject and Word - it works
perfect !
Why not in Visio ?
Thanks in advance.
I've got problems accessing some properties of buttons on my own toolbar in
Visio. Mainly I really need to change the 'Enabled' property of some buttons
(depending on specific states, which are changing at runtime).
I tried both.. creating/refering to them as "Office.CommandBars"-objects and
as "Visio.UIObject"-objects aswell. Both ways of using custom buttons in
Visio are just working fine. But they both start working weird, when it comes
to changing their properties at runtime.
For example the 'Enabled' property: Sometimes accessing it results in an
exception (via Office.CommandBars).. sometimes I can change it, but the state
doesn't update in Visio anyway (Visio.UIObject).
And yes.. I AM keeping them at a class level, that they aren't collected by
the GC at runtime. Again.. everything works fine with them, inspite of
changing their properties like 'Enabled' at runtime.
I'm doing the same in Excel, PowerPoint, MSProject and Word - it works
perfect !
Why not in Visio ?
Thanks in advance.