Click to See Complete Forum and Search --> : activex control


vbnov
January 30th, 2003, 03:58 PM
hi all
i use label & timer control in my asp page.

<object id="ietimer" width=39 height=39 classid="clsid:59ccb4a0-727d-11cf-ac36-00aa00a47dd2">
<param name="Interval" value="50">
</object>


<object id="ielabel" width=150 height=150 classid="clsid:99b42120-6ec7-11cf-a6c7-00aa00a47dd2">
<param name="caption" value=" ">
<param name="angle" value="0">
<param name="alignment" value="4">
<param name="mode" value="1">
<param name="fillstyle" value="0">
<param name="forecolor" value="#000000">
<param name="backcolor" value="#c0c0c0">
<param name="fontname" value="arial">
<param name="fontsize" value="14">
<param name="fontitalic" value="0">
<param name="fontbold" value="1">
<param name="fontunderline" value="0">
<param name="fontstrikeout" value="0">
<param name="toppoints" value="0">
<param name="botpoints" value="0">
</object>

but when i see the page it appears as "X" . I use PWS & IE5.Does PWS supports activex controls? what should i do to make it work? help is greatly appreciated.

Brane
January 31st, 2003, 02:36 AM
To work, ActiveX control must be instaled on client.
You can use automatic download and install activeX control with codebase Attribute of OBJECT tag.

Brane

vbnov
January 31st, 2003, 01:16 PM
thnx brane for the reply. Could you plz be more specific as I am a novice. Thnx in advance.

Brane
February 3rd, 2003, 01:11 AM
read this site :MFC on internet (http://support.microsoft.com/default.aspx?scid=KB;en-us;q167158)

DeivaGanesh
February 3rd, 2003, 11:37 PM
the thing to add for the codebase is

<object id="ietimer" width=39 height=39 classid="clsid:59ccb4a0-727d-11cf-ac36-00aa00a47dd2" >codebase="relative path of ur cab file in the server"


hope this helps

vbnov
February 10th, 2003, 02:37 PM
hi

when i tried it says my browser doesnt support this property. Do i have to change any settings in the IE properties.Also How do i find which .cab is for which control? Hope you got my point. Any help would be greatly appreciated. Thnx.

antares686
February 12th, 2003, 05:26 PM
Ok codebase should be inside the <object tag>.

Here is the one I use for the Crystal Report Viewer


<OBJECT ID="CRViewer"
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
WIDTH=100% HEIGHT=100%
codebase="viewers/activeXViewer/activexviewer.cab#Version=8,0,0,387" VIEWASTEXT>


Note I have it inside the tag not outside.

Now PWS has nothing to do with whether or not activex is supported, this is purely a browser thing.

As for the control you are trying to use you they are common and provided by MS.

Here is an example of both

Timer Control

<OBJECT ID=Timer1 CLASSID="clsid:59CCB4A0-727D-11CF-AC36-00AA00A47DD2"
CODEBASE="http://activex.microsoft.com/controls/iexplorer/x86/ietimer.cab#version=4,71,115,0">
ALIGN=MIDDLE>
<PARAM name="Interval" VALUE="100">
<PARAM name="Enabled" VALUE="True">
</OBJECT>

<OBJECT ID=Timer2 CLASSID="clsid:59CCB4A0-727D-11CF-AC36-00AA00A47DD2"
CODEBASE="http://activex.microsoft.com/controls/iexplorer/x86/ietimer.cab#version=4,71,115,0">
ALIGN=MIDDLE>
<PARAM name="Interval" VALUE="500">
<PARAM name="Enabled" VALUE="True">
</OBJECT>

<SCRIPT LANGUAGE="VBSCRIPT">
Sub Timer1_timer
label.Angle = (label.Angle + 5) mod 360
End Sub
Sub Timer2_timer
cool.forecolor = rnd() * 16777216
End Sub
</SCRIPT>


Label Control

<OBJECT ID=Label1 CLASSID="clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2"
CODEBASE="http://activex.microsoft.com/controls/iexplorer/x86/ielabel.cab#version=4,71,115,0"
WIDTH=150 HEIGHT=500 VSPACE=0 ALIGN=LEFT>
<PARAM NAME="Angle" VALUE="270">
<PARAM NAME="Alignment" VALUE="2">
<PARAM NAME="BackStyle" VALUE="0">
<PARAM NAME="Caption" VALUE="Properties">
<PARAM NAME="FontName" VALUE="Times New Roman">
<PARAM NAME="FontSize" VALUE="60">
</OBJECT>



You will not each codebase listed. Now I have not tested this so if you run into further issues I suggest looking the up on the MSDN website search for "ActiveX Controls Overview" and by control name. You may also need to generate a LPK or License file but I found no mention.

vbnov
February 17th, 2003, 11:13 AM
thnx a lot for ur help.

I tried the codebase with my application. the error i got was " object doesnt support this property or method ielabel.caption".

this is the code

randomize
message= array("Join today!","Fine Dining!","Impress Friends!","Save Money!","Be Cool!")
msgno = 0
colorno = 1
angle = 0

sub ietimer_timer
ielabel.caption= message(msgno)
ielabel.angle = angle
angle= angle + 5
if angle > 360 then
angle = 0
msgno = msgno + 1
if msgno > 4 then msgno = 0
changecolor
end if
end sub


sub changecolor
ielabel.forecolor = rnd * 16777215
end sub


Plz help. thnx in advance

antares686
February 18th, 2003, 05:34 AM
Not sure what specific is the reason as the examples I find say do that. But I discovered the control was removed with IE5 and I am not able to get it installed to test with. See here (http://support.microsoft.com/default.aspx?scid=kb;en-us;190045) for the details on the removal.

vbnov
February 20th, 2003, 06:36 AM
first i got the "download and install window".when i clicked yes i got the error "" object doesnt support this property or method ielabel.caption".

dont know why.....