How to disable OcxState of axWebBrowser?

  • Thread starter Thread starter Clemens Chiba - Greentube I.E.S. AG
  • Start date Start date
C

Clemens Chiba - Greentube I.E.S. AG

Hi!

I habe another problem with the axWebBrowser component.

I added one into a form and it worked ok when I started the
application. Then I changed the size of the browser and started
the program again, but the new size has been ignored. The old
values seemed to be remembered.

I found out that it has something to do with the OcxState,
after commenting out the line
this.browserMessage.OcxState =
((System.Windows.Forms.AxHost.State)
(resources.GetObject("browserMessage.OcxState")));
in the InitializeComponent method it worked fine.

Unfortunately the comment is removed when making changes to
the form and saving it, since it seems to be impossible to
make permanent changes in InitializeComponent. I even tried
to set the OcxState after InitializeComponent manually to
different values, but I always got an exception.

How can I ged rid of this behavior?
Is there a hidden attribute to switch this feature off?

I don't want anything being stored of my application except
the things I store manually, so I really think I don't need
to have the OcxState set.

Ciao and bye,
(:Clemens:)
 
Back
Top