I'm using a third party control to create child form to the existing form.The child form has visio control added to it.But whenever i try to access axdrawingcontrol.window property it throws an exception :
Exception from HRESULT: 0x80070006 (E_HANDLE). The code works fine if the visio control belongs to the parent form.Can anyone tell what could possibly be the reason for this exception
joules,
No idea why this happens, but let me ask: does this happen at design time, or are you creating it on the fly?
And if it is a design-time problem, try adding a new Visio control to your child form programmatically, and see if you can get that to work.
Early versions of the Visio control used to crash and disappear from the designer, so I resorted to always creating the Visio control programatically for a while. Might be worth a shot.
The code started working when i moved it to the constructor for the child form.Earlier i had written it in the formload method for the child form. But still some of the properties are not working here also.Like if i set the zoom property to a specific value, appearance changes accordingly.But when i try setting the properties to disable scrollbars and all though the value of the property changes it has no effect on the appearance.