A
app2001
Unregistered / Unconfirmed
GUEST, unregistred user!
我有一个用DELPHI开发的OCX控件,是监测USB口的拔出和插入操作的,在VB和DELPHI中调用该OCX控件,只要有USB方面的操作,它都会响应该事件并提示相关信息出来。
Private Sub WinCallBackOBJX1_OnOsCallBack(ByVal Msg As Long, ByVal WParam As Long, ByVal LParam As Long, Result As Long)
Text1.Text = "USB有改变了"
+ CStr(Msg) + CStr(WParam) + CStr(LParam) + CStr (Result)
End Sub
但现在我需要在网页中调用这个OCX控件,并让其在页面中响应这个事件,我用如下两种方法来调用它都没有反应
<HTML>
<HEAD><TITLE>简单验证</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:E2D8C079-4CAC-409D-A9AC-CC15E8E3CF92"
codebase="WinCallBackOBJXControl1.ocx#version=1,0,0"
id="WinCallBackOBJXControl1"
>
</OBJECT>
<script language="vbscript">
Private Sub OnOsCallBack(Msg,WParam,LParam, Result)
MsgBox "USB有改变了"
End Sub
</script>
</BODY>
</HTML>
二、
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<meta name="GENERATOR"
content="Microsoft FrontPage 4.0">
<meta name="ProgId"
content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<object classid="clsid:E2D8C079-4CAC-409D-A9AC-CC15E8E3CF92"
id="WinCallBackOBJX1">
<param name="DoubleBuffered"
value="0">
<param name="Enabled"
value="-1">
<param name="Visible"
value="-1">
</object>
<SCRIPT language="javascript"
for="WinCallBackOBJXControl1"
event="OnCallBack()">
alert('USB有改变了');
</SCRIPT>
</body>
</html>
有哪位熟悉这方面的朋友请给一下指教,事成之后再补上200分送上,拜托了!
Private Sub WinCallBackOBJX1_OnOsCallBack(ByVal Msg As Long, ByVal WParam As Long, ByVal LParam As Long, Result As Long)
Text1.Text = "USB有改变了"
+ CStr(Msg) + CStr(WParam) + CStr(LParam) + CStr (Result)
End Sub
但现在我需要在网页中调用这个OCX控件,并让其在页面中响应这个事件,我用如下两种方法来调用它都没有反应
<HTML>
<HEAD><TITLE>简单验证</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:E2D8C079-4CAC-409D-A9AC-CC15E8E3CF92"
codebase="WinCallBackOBJXControl1.ocx#version=1,0,0"
id="WinCallBackOBJXControl1"
>
</OBJECT>
<script language="vbscript">
Private Sub OnOsCallBack(Msg,WParam,LParam, Result)
MsgBox "USB有改变了"
End Sub
</script>
</BODY>
</HTML>
二、
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<meta name="GENERATOR"
content="Microsoft FrontPage 4.0">
<meta name="ProgId"
content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<object classid="clsid:E2D8C079-4CAC-409D-A9AC-CC15E8E3CF92"
id="WinCallBackOBJX1">
<param name="DoubleBuffered"
value="0">
<param name="Enabled"
value="-1">
<param name="Visible"
value="-1">
</object>
<SCRIPT language="javascript"
for="WinCallBackOBJXControl1"
event="OnCallBack()">
alert('USB有改变了');
</SCRIPT>
</body>
</html>
有哪位熟悉这方面的朋友请给一下指教,事成之后再补上200分送上,拜托了!