Hi
I forget to add, it throws an exception "specified case is not valid".
my codes like this:
'it is the same with all the methods
Friend WithEvents AxMYACT1 As AxMYACT_ActiveX.AxMYACT or Dim AxMYACT1 As =
New AxMYACT_ActiveX.AxMYACT or Dim AxMYACT1 As Object
'''
' do my stuff
'''
'than release
Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(Me.AxMYACT1 =
) 'it throws an exception "specified case is not valid"
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.Message)=20
Finally
Me.AxMYACT1 .Dispose()
Me.AxMYACT1 =3D Nothing
End Try
How can I call the release without the exception?
Thanks
Egghead
[quoted text, click to view] "Egghead" <robertlo@shaw.ca> wrote in message =
news:Shn%d.745015$8l.129240@pd7tw1no...
Hi,
I try that, it does not work at all.
Egghead
[quoted text, click to view] "Scott M." <NoSpam@NoSpam.com> wrote in message =
news:uuuN4uJLFHA.440@TK2MSFTNGP10.phx.gbl...
Are you calling:=20
System.Runtime.InteropServices.Marshal.ReleaseComObject(comObj) in =
addition=20
to removing the managed references to the com object?
[quoted text, click to view] "EggHead" <robertlo@shaw.ca> wrote in message =
news:EYE_d.715110$6l.312054@pd7tw2no...
Hi all,
I am trying to put a Vb6.0 activeX control into a VB.net project. =
The Vb 6.0 activeX control works fine in a VB6.0 app.
But the problem comes when I close down the Vb.net app. I get =
the"exception privileged error". I think it is because the ActiveX =
components are not shut down in the necessary order when the application =
ends. I already call dispose and set the control to nothing. So, is =
there a way to force the activeX control unload all dll and component?
Thank you all in advance :)