Hi,
I have created an custom Designer app which has tool box and design surface. In my tool box i have some activex component ,when i drag and drop those components to the designer area then it creates those controls in my design area,but when the activex control is a having runtime license then when i am drag and drop the control to the design area it asks for licenseso i followed the typical procedure of runtime license for activex control
System.Reflection.
FieldInfo f = typeof(AxHost).GetField("licenseKey", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
f.SetValue(
this, "{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}");
but still it asks for the license.
i tried simple sample of
public
class Class1 : OriginalActivexControl
{
public Class1()
{
System.Reflection.
FieldInfo f = typeof(AxHost).GetField("licenseKey", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
f.SetValue(
this, "{C5412DDA-2E2F-11D3-85BF-00105AC8B715}");
}
}
}
in my form load i did the following
Class1 obj = new Class1();
Controls.Add(obj);
obj.Left = 100;
obj.Top = 10;
obj.Width = 275;
obj.Height = 275;
obj.Show();
it works fine...
but if i do the same thing in my designer application it fails pls let me know how to do solve this issue
regards
LongHorn7