Problem with WebBrowser control

Started by honkinberry, December 17, 2010, 11:12:52 AM

Previous topic - Next topic

honkinberry

I'm having an issue with a WebBrowser control.
I'm trying to close the dialog if the user clicks on certain links.  Also through Javascript.

In the attached example, everything works fine with the control in general.
But click the button, which sets a flag to close the form on the next browser navigation.
Then when clicking on any link, the form_close fires a Cx0000005 access violation.

I tried setting the Cancel parameter to true, but that error is even more grievous.

Thanks for any thoughts!

--J

owenwengerd

I've attached a version that returns Cancel set to True. That version doesn't crash on my computer.
Owen Wengerd (Outside The Box) / ManuSoft

honkinberry

That makes perfect sense, and it seems to work.  Many thanks.

So it would seem the moral of the story is that all ActiveX events should return a quoted list of the parameters?  Is it safe to return nil if no change is desired?

--J

owenwengerd

The return list should include only the parameters that are passed by reference, and it all depends on the control as to whether or not a NIL return is acceptable. I would guess that the vast majority of ActiveX events ignore any return value, but use the Control Browser to determine what, if anything, it expects.
Owen Wengerd (Outside The Box) / ManuSoft