|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HowTo Loading ActiveX dinamically at runtime ?The point is the following I need to add ActiveX control dinamically in a Webform. Currently I'm doing this using a literal control and "writing the HTML Code" for example: lit.Text = "<OBJECT id=Dtpicker1 name=Dtpicker1 height=24 width=90% align=center classid='clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1' " >" & _ "<PARAM NAME='OLEDropMode' VALUE='0'>" & _ "<PARAM NAME='CalendarBackColor' VALUE='-2147483643'>" & _ "<PARAM NAME='CalendarForeColor' VALUE='-2147483630'>" & _ "<PARAM NAME='CalendarTitleBackColor' VALUE='-2147483633'>" & _ "<PARAM NAME='CalendarTitleForeColor' VALUE='-2147483630'>" & _ "<PARAM NAME='CalendarTrailingForeColor' VALUE='-2147483631'>" & _ "<PARAM NAME='CurrentDate' VALUE='3445565'>" & _ "<PARAM NAME='UpDown' VALUE='1'>" & _ "<PARAM NAME='MaxDate' VALUE='2958465'>" & _ "<PARAM NAME='MinDate' VALUE='-109205'>" & _ "</OBJECT>" controls.add(lit). It works but I want something cleaner, such as using AXHost, but that I can added as a Web control, for example: Dim AxDTPicker as new mscomct2.DateTimepicker AxDTPicker.value = '3445565' Controls.add(AxDTPicker) Is any other way to add ActiveX controls dinamically ? Thnaks Why not create a custom control - derive it from Label and make cutom
elements (for params to the activeX). Some example of new properties of the new control can be: string CLSID string Height string Width string Align (or Align Align, where Align is enum) ParameterList Parameters (this is the list of parameters/values). Override the Render method. Now, you can host this control as custom control, like: <prefix:ActiveXControl ... width=".." clsid="..." runat="server"> <prefix:Parameter name="..." value="..." runat="server"/> ... </prefix:ActiveXControl> -- Cheers, Gaurav Vaish http://www.mastergaurav.org http://mastergaurav.blogspot.com -------------------------------- Thanks for answering.
Create a custom control it is not an option, becuase I have to load several Activex, some of them are very complex, migrate is the final idea, but now i need to use the ActiveX currently running. Thnaks Show quoteHide quote "MasterGaurav" wrote: > Why not create a custom control - derive it from Label and make cutom > elements (for params to the activeX). > > Some example of new properties of the new control can be: > string CLSID > string Height > string Width > string Align (or Align Align, where Align is enum) > ParameterList Parameters (this is the list of parameters/values). > > Override the Render method. > > Now, you can host this control as custom control, like: > > <prefix:ActiveXControl ... width=".." clsid="..." runat="server"> > <prefix:Parameter name="..." value="..." runat="server"/> > ... > </prefix:ActiveXControl> > > > -- > Cheers, > Gaurav Vaish > http://www.mastergaurav.org > http://mastergaurav.blogspot.com > -------------------------------- > > Ah! Couldn't response earlier.. was travelling.
Can you please elaborate on "need to use the Activex currently running"? What exactly do you mean in this... If you have "several complex" activeX, then I think there's no other option than the current way. You may like to use Label instead of literal text... but anyway, it doesn't matter. If you are looking for AXHost for ASP.Net, you'd need to write the code. IMHO, nothing is readily available as of now. May be you have a look at http://www.asp.net if something is available. -- Cheers, Gaurav Vaish http://www.mastergaurav.org http://mastergaurav.blogspot.com -------------------------------- Thanks,
What i tried to explain was that the ActiveX are some applications that people are accustomed to use them, but they are distribute in different portals. I would like to put all in one portal, and add some other .net webforms. Due to the fact that these ActiVeX are "in production", I'd like, in this stage, not to migrate to .Net, but I need to "load them" in a webforms in runtime. Anyway , thanks for all. Talking about AxHost, do you know some links or something to learn about it ?. Show quoteHide quote "MasterGaurav" wrote: > Ah! Couldn't response earlier.. was travelling. > > Can you please elaborate on "need to use the Activex currently > running"? What exactly do you mean in this... > > If you have "several complex" activeX, then I think there's no other > option than the current way. You may like to use Label instead of > literal text... but anyway, it doesn't matter. > > If you are looking for AXHost for ASP.Net, you'd need to write the > code. IMHO, nothing is readily available as of now. May be you have a > look at http://www.asp.net if something is available. > > > -- > Cheers, > Gaurav Vaish > http://www.mastergaurav.org > http://mastergaurav.blogspot.com > -------------------------------- > >
How to implement a property like ControlToValidate property?
Problem with ViewState TabStrip/Multipage using UserControl (.ascx) contained within a UserControl(.ascx) createuserwizard refuese to add users due to password Treeview IE Web Control and Mac Client side dynamic graphing problem TabStrip sample displays text only Any Descent Gantt Chart ASP.NET Webform Components? Textbox error Submit Form on Enter Pressed |
|||||||||||||||||||||||