如何在C#App中使用Vb6用户控件? [英] How to use Vb6 usercontrol in C# App?

查看:94
本文介绍了如何在C#App中使用Vb6用户控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由VB6编写的usercontrol(.ctl文件),但是我想在C#应用程序中使用它,该怎么做?谢谢.

p/s:我无法将此用户控件编译为.ocx文件,因为出现错误"Variable使用了Visual Basic不支持的类型"(对于VB6),并且无法修复此错误. ="h2_lin">解决方案

我非常确定,使用C#或VB.NET完全切换到.NET会比这种麻烦的折磨自己便宜得多,并且产生的代码好得多.毕竟,您只需要一个解决方案;而且Visual Studio的任何版本都不会一起支持VB6和C#.VB6已经死了,您看不到吗?

(实际上,它在创建之时就已经死了,所有开发人员都被归类为首先意识到它的人,而其余的则归为其他人.:-))

—SA


I have a usercontrol (.ctl file) wrote by VB6, but I want to use it in C# app, how to do this? Thanks.

p/s: I can''t compile this usercontrol to .ocx file because I get an error ""Variable uses a type not supported in Visual Basic" (with VB6) and I can''t fix this error.

解决方案

I''m pretty much sure that switching totally to .NET using C# or VB.NET would be much, much cheaper and produce much better code than torturing yourself by this cumbersome kind of interoperation. After all, you need just one solution; and no version of Visual Studio will ever support VB6 and C# together. VB6 is dead, can''t you see that?

(In fact, it was dead at the moment of creation, and all developers are classified into those who realized it in first place and the rest. :-))

—SA


这篇关于如何在C#App中使用Vb6用户控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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