解决方案 »
- 华丽丽的不知道怎么弄呢。
- 关于单元测试问题
- 大虾帮忙,struts2.0多文件上传...
- 小虾做了个网站,但不知道怎么上传到网上去。大虾们帮忙出点主意吧。
- 关于apache下不能显示中文的问题!
- "mmsDetail.jsp": There is no web application that can act as the root of the JSP file(100分),不少吧?
- 请问那里有较好的社区下载
- 调用javavbean时出现了异常??请大虾进来看看!!
- 请问我用Dreamweaver做的页面中文不能正确显示?
- 一个关于Link方式样式表的问题,结解就给分?
- eclipse中的web工程导入myeclipse中,出现servlet错误,怎么解决?
- jsp中是怎么使用java包的单例的
回fangmingshijie: 对这个调用不太理解,
能给个案例瞧瞧嘛?怎么个这个控件调用出来?
import java.awt.event.*;
import java.applet.*;import com.jacob.com.*;
import com.jacob.activeX.*;public class AppTest extends Applet implements ActionListener
{
TextField in;
TextField out;
Button calc;
ActiveXComponent sC = null;
Object sControl = null; public void init()
{
setLayout(new FlowLayout());
add(in = new TextField("1+1", 16));
add(out = new TextField("?", 16));
add(calc = new Button("Calculate"));
calc.addActionListener(this);
} public void actionPerformed(ActionEvent ev)
{
if (sC == null)
{
// create COM component in event thread
sC = new ActiveXComponent("ScriptControl");
sControl = sC.getObject();
Dispatch.put(sControl, "Language", "VBScript");
}
// use COM component in same thread
Variant v = Dispatch.call(sControl, "Eval", in.getText());
out.setText(v.toString());
}
}
不行的话,主页中可能有解决方案
http://danadler.com/jacob/
原来要自己写ocx组件,还牵扯到c/c++或者VB之类的. call里面的参数是封装好的.
虽然不是俺想要的答案.但是谢谢两位!