 |
Publicité
|
1- Insertion de l'Active X label :
Le code d'insertion d'un Active X est trés proche du code d'insertion d'une applet JAVA dans une page HTML.
<object id="label0" classid = "clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2" codebase = "http://activex.microsoft.com/controls/iexplorer
/ielabel.ocx #version=4,70,0,1161" align="left" border="0" vspace="10" hspace="0" width="215" height="40" type="application/x-oleobject">
<param name="Angle" value="0">
<param name="Alignment" value="4">
<param name="BackStyle" value="1">
<param name="Caption" value="Deplacez vous ici !!!">
<param name="FontName" value="Times New Roman">
<param name="FontSize" value="14">
<param name="ForeColor" value="#f000f0">
</object>
2- Insertion de l'Active X Popup :
<object id="PopObj" classid = "clsid:A23D7C20-CABA-11CF-A5D4-00AA00A47DD2" codebase = "http://activex.microsoft.com/controls/iexplorer/
iepopwnd.ocx #Version=4,70,0,1161" align="right" border="0" vspace="10" width="215" height="40" type="application/x-oleobject">
</object>
3- Gestion des événements avec VBScript :
<script language="VBSCRIPT">
Sub Label0_MouseMove(ByVal s, ByVal b, ByVal x, ByVal y)
PopObj.Popup "http://www.devparadise.com/article/", True
End Sub
Sub Link1_OnClick
' Navigation code would be entered here
End Sub
Function StrGetUrlBase()
Dim strBase, strSlash, idx
strBase = Location.HRef
If (Left(strBase,5)) = "file:" then
strSlash = "\"
ElseIf (Left(strBase,5)) = "http:" then
strSlash = "/"
Else
strBase = ""
strSlash = "/"
End If
idx = Len(strBase)
While idx > 0 And Mid(strBase, idx, 1) <> strSlash
idx = idx - 1
Wend
strBase = Left(strBase,idx)
StrGetUrlBase = strBase
End Function
</script>
4- Résultats :
|