Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > HowTo Loading ActiveX dinamically at runtime ?

Reply
Thread Tools

HowTo Loading ActiveX dinamically at runtime ?

 
 
Leo sailer
Guest
Posts: n/a
 
      04-27-2005
Hi,
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
 
Reply With Quote
 
 
 
 
MasterGaurav
Guest
Posts: n/a
 
      04-28-2005
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">
<prefixarameter name="..." value="..." runat="server"/>
...
</prefix:ActiveXControl>


--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

 
Reply With Quote
 
 
 
 
Leo sailer
Guest
Posts: n/a
 
      04-28-2005
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

"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">
> <prefixarameter name="..." value="..." runat="server"/>
> ...
> </prefix:ActiveXControl>
>
>
> --
> Cheers,
> Gaurav Vaish
> http://www.mastergaurav.org
> http://mastergaurav.blogspot.com
> --------------------------------
>
>

 
Reply With Quote
 
MasterGaurav
Guest
Posts: n/a
 
      05-05-2005
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
--------------------------------

 
Reply With Quote
 
Leo sailer
Guest
Posts: n/a
 
      05-05-2005
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 ?.

"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
> --------------------------------
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
Dinamically loading an image into a iframe spallared Javascript 1 04-26-2007 04:57 PM
loading dinamically webforms =?Utf-8?B?am9zZXBt?= ASP .Net 3 10-07-2005 05:35 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
ActiveX control on ASP.NET Web Form Runtime Error ann ASP .Net 0 07-24-2003 10:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57