Hi,
I'm having troubles with terminating an application. When I close the main form everything dissapears but the process remains active. I think I know the cause, a certain activeX component will not release properly. As soon as I create one, I can't close normally...
Probably a bug in that component, but the problem is that I don't have much of a choice, I'll have to use that component for now. Is there any way to fix this or forcing to close the application anyway?
Regards,
Rick
[EDIT]
Excuse me, I posted to quickly as I already found a solution. Calling
System.Runtime.InteropServices.Marshal.ReleaseComObject( myObject )
will kill the reference and now the application closes properly.
Greetz
I'm having troubles with terminating an application. When I close the main form everything dissapears but the process remains active. I think I know the cause, a certain activeX component will not release properly. As soon as I create one, I can't close normally...
VB.NET:
dim someActiveXcomponent = new X()
...
<formClosing>
someActiveXcomponent = nothing
GC.Collect()
GC.WaitForPendingFinalizers ' here it hangs
Regards,
Rick
[EDIT]
Excuse me, I posted to quickly as I already found a solution. Calling
System.Runtime.InteropServices.Marshal.ReleaseComObject( myObject )
will kill the reference and now the application closes properly.
Greetz