Createobject函数转换过程从VB到c#.net [英] Createobject function conversion process form VB to c#.net

查看:356
本文介绍了Createobject函数转换过程从VB到c#.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将VB项目转换为C#。现在我遇到了Createobject函数的问题,我无法理解它究竟是什么。



I am in the process of converting a VB Project to C#. Now I am getting problem with a Createobject function,which I couldn't understand exactly what it is.

Set DVXRT = VBA.CreateObject("DVXR48OLE.CDVXRT")
If (DVXRT.Login(nFirma, sCode$, sPWT$, gsDBServer, sPath)) Then.....



这里 DVXR48OLE.CDVXRT 是由某人完成的应用程序。当If条件进入时,加载登录表单。登录表格来自申请表。



我尝试过:



我在C#中试过这个


Here DVXR48OLE.CDVXRT is an application done by some person.When the If condition enters, a login form is loaded. Login form is from the application.

What I have tried:

I tried this in C#

<pre lang="c#"> Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("DVXR48OLE.CDVXRT"));
If (obj.Login(nFirma, sCode$, sPWT$, gsDBServer, sPath)





错误来自没有登录obj 。问题是没有关于应用程序的详细信息。如果有人有想法请分享我。它会非常有帮助



Error comes that there is no Login in obj. The problem is no details about the application. If anyone have ideas please share me. It ll be so helpful

推荐答案

,sPWT


,gsDBServer,sPath))然后 .....
, gsDBServer, sPath)) Then.....



这里 DVXR48OLE.CDVXRT 是由某人完成的应用程序。当If条件进入时,会加载登录表单。登录表格来自申请表。



我尝试过:



我在C#中试过这个


Here DVXR48OLE.CDVXRT is an application done by some person.When the If condition enters, a login form is loaded. Login form is from the application.

What I have tried:

I tried this in C#

<pre lang="c#"> Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("DVXR48OLE.CDVXRT"));
If (obj.Login(nFirma, sCode


,sPWT


这篇关于Createobject函数转换过程从VB到c#.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆