Problem in closing MDIChild Form having ActiveX control

G

Guest

I have VB2005 Application. It has VB MDI Form and MDI Child form.
The child Form hosts an ActiveX control.
when I close the ChildForm at runtime, It gives error message
"AccessViolation Exception: Attempt to read or write protected memory".
This problem occurs only the activex controls is hosted in MDI Child form.

I hosted the activex control in a Windows Form. It works fine on close.
The problem I see only with MDI child form.
I think, the activex control is not disposed properly in case of MDI child
form.
Could anyone help me in solving this.
 
R

RobinS

Are you disposing of the ActiveX control in the Form_Closing event of your
MDI child? Or you could also try disposing your MDI child and see if that
helps.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top