在网页调用 WINDOWS 控件两例(5)_Dreamweaver教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

END SUB

SUB MsgrObj_OnLogonResult(ByVal hr,ByVal pService)
If 0=hr And Err.description="" Then
mcClearCache
B_=False
RefreshMC
Else
mcClearCache
B_=False
RefreshMC
End If
END SUB

SUB MsgrObj_OnLogoff()
mcClearCache
B_=False
RefreshMC
END SUB

SUB MsgrObj_OnAppShutdown()
RefreshMC
END SUB


' Launches chat window for a given user, or
' launches the logon window, or simply brings up
' Messenger to show all contacts.
Function op(n)
If HasMsgrApp Then
If n>=0 Then
document.all.mctrack.src="P/6/"
On Error Resume Next
MsgrApp.LaunchIMUI OnA(n)
ElseIf-1=n Then
MsgrApp.LaunchLogonUI
Else
MsgrApp.Visible=1
End If
End If
End Function

Function htmlesc(str)
str=Replace(str,"&","&")
str=Replace(str,"<","<")
htmlesc=Replace(str,">",">")
End Function

Function fixName(s,max)
If Len(s)>max Then
s=Left(s,max-2)&"..."
End If
fixName=htmlesc(s)
End Function

Function getStateImage(t)
Select Case t
Case 1
getStateImage=OffL 'Offline
Case 2
getStateImage=N_ 'Online
Case 10
getStateImage=O_ 'Busy
Case 14
getStateImage=P_ 'BRB
Case 18
getStateImage=P_ 'Away
Case 34
getStateImage=P_ 'Away... as well.......
Case 50
getStateImage=O_ 'On The Phone
Case 66
getStateImage=O_ 'Out To Lunch
End Select
End Function
</script>

<OBJECT id=MsgrObj height=0 codeType=application/x-oleobject width=0
classid=clsid:F3A614DC-ABE0-11d2-A441-00C04F795683>
<span style="display:none;"> </span>
</OBJECT>

<script language="VBScript" event="onReadyStateChange" for="mcvbs">
If mcvbs.readyState="complete" And Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</script>

<script language="VBScript" event="onload" for="window">
If Not isDrawn_ Then
isDrawn_=True
DrawInitialState
call HideElement(mOff)
End If
</script>

<tr bgcolor="#3D55C4">
<td class="small">
<div class="small" align=center id="msngrheading" style="width:100%; color: #eff7ff; background-color:#3D55C4; padding:3px; padding-left:0px;"><b>MSN Messenger</b></div>

</td>
</tr>
<tr>
<td bgcolor="#EFF7FF" class="small">
<div id="getmsgr" class="small" align=center style="DISPLAY:none;color:#000000;"><br>Download<br><a href="http://messenger.msn.com/">Windows Messenger</a>
<img id="mctrack" height="1" alt width="1">
</div>
<div id="msgrlogon" class="small" style="DISPLAY:none">
<div id="statu" class="small" style="color:#000000"></div>
</div>
<!--ONLINE-->
<div id="Online" class="small" style="DISPLAY:none;color:#000000"></div>

来源:网上收集//所属分类:Dreamweaver教程/更新时间:2005-05-04
相关Dreamweaver教程