I have an XML file that my application reads at runtime:
<form>
<control clsid="B5ECA9DC-879F-40BC-9298-3E399E099C0B">
<name>btnGO</name>
<top>10</top>
<left>10</left>
<myint>273</myint>
<mystring>Hello world</mystring>
<mydate>01/01/2001</mydate>
</control>
<control clsid="D2059891-6123-48B7-ADFF-0E127F38B5B0">
...
</control>
</form>
These serialised forms can contain any registered control on the system.
I want to be able to construct a standard dotnet form with the ActiveX
controls on it.
I have a very simple implementation of AxHost as follows:
public class MyAxHost : System.Windows.Forms.AxHost {
public MyAxHost(string CLSID) : base(CLSID) {}
}
The name, top and left properties are easy, as AxHost inherits them from
Control.
However, I have no idea how to access my custom properties myint, mystring
and mydate.
I'm thinking that I need to add a method to MyAxHost:
public void SetProperty(string Property,object Value) {}
but I have no idea how to implement it.
Any advice welcome.
Nathan