I have an application written in VB.Net which dynamically hosts VB6 ocx
(written in house). The appilcation works fine on XP or Windows 2000. It
also works fine on Vista if run in debug mode with the "Visual Studio hosting
process" selected. But, when run as a compiled application, it will fail
with Automation error -2147417848, The object invoked has disconnected from
its clients. I have found the line the the app chokes on(see below), but not
really sure why? Again, this only occurs on Vista when I run the compiled
version of the app. Any ideas?
Thanks.
'dynamically create the control, with picture box as it's container
Set m_objVBControlExtender(lngTabNumber) = UserControl.Controls.Add _
("MyControl", strInstanceName, pic(lngTabNumber))
m_objVBControlExtender is an aray of VBControlExtender objects.