msrdp.ocx(win远程桌面控件)的注册问题(已经郁闷几天了,请各位大虾帮帮忙!看看吧)
我现用一个msrdp.ocx(win远程桌面控件),在html中正确引用如下:
<OBJECT language="vbscript" ID="MsRdpClient"
onreadystatechange="OnControlLoad"
CLASSID="CLSID:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a"
CODEBASE="msrdp.cab#version=5,1,2600,2180"
WIDTH=<% resWidth = Request.QueryString("rW")
if resWidth < 200 or resWidth VIEWASTEXT VIEWASTEXT> 1600 then
resWidth = 800
end if
Response.Write resWidth %>
HEIGHT=<% resHeight = Request.QueryString("rH")
if resHeight < 200 or resHeight > 1200 then
resHeight = 600
end if
Response.Write resHeight %>>
</OBJECT>
但我在asp.net中怎么调用都不成功
我用的是asp.net + C#
在aspx中添加一个server类型的按钮,然后在引用中也添加了该msrdp.ocx控件的引用了,我也用
regsvr32对控件注册过了,但是还总是报该COM控件无效或未注册
代码如下
using MSTSCLib;
private void Button1_Click(object sender, System.EventArgs e)
{
string resWidth,resHeight
//MsRdpClient 是控件中的一个类,在这里进行实例化
MSTSCLib.MsRdpClient IMsTscAx; //就是在这里产生错误
IMsTscAx = new MSTSCLib.MsRdpClient();
IMsTscAx.Server = "fk021";
IMsTscAx.UserName = "zhou";
IMsTscAx.FullScreen = false;
resWidth = "600";
resHeight = "800";
switch(fullscreen)
{
case "1":
MsTscAx.FullScreen = true;
resWidth = "600";
resHeight = "800";
break;
case "2":
resWidth = "640";
resHeight = "480";
break;
case "3":
resWidth = "800";
resHeight = "600";
break;
case "4":
resWidth = "1024";
resHeight = "768";
break;
case "5":
resWidth = "1280";
resHeight = "1024";
break;
case "6":
resWidth = "1600";
resHeight = "1200";
break;
}
}
是不是在C#中还要什么注册,怎么注册,我对asp.net+ C#不是很熟,这个问题我已经郁闷了好几天了
怎么也调试不出来
,请各位大哥帮忙看看,我的分不是很多。