Home All Groups Group Topic Archive Search About

Problem in closing MDIChild Form having ActiveX control

Author
12 Mar 2007 8:28 AM
raviprakash g
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.

Author
12 Mar 2007 2:47 PM
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.
---------------------------------------------------
Show quote
"raviprakash g" <ravipraka***@discussions.microsoft.com> wrote in message
news:1E80F9D5-4D4C-416E-983F-F590D243F035@microsoft.com...
>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.
>

AddThis Social Bookmark Button