This documentation is archived and is not being maintained.

AxHost.OcxState Property

Gets or sets the persisted state of the ActiveX control.

[Visual Basic]
Public Property OcxState As AxHost.State
public AxHost.State OcxState {get; set;}
public: __property AxHost.State* get_OcxState();
public: __property void set_OcxState(AxHost.State*);
public function get OcxState() : AxHost.State;
public function set OcxState(AxHost.State);

Property Value

An AxHost.State that represents the persisted state of the ActiveX control.


Exception Type Condition
Exception The ActiveX control is already loaded.


The value of the OcxState property is used after the control is created but before it is shown. The persisted state of the underlying ActiveX control is returned in the AxHost.State.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

AxHost Class | AxHost Members | System.Windows.Forms Namespace | AxHost.State | GetOcx