来自C#的CodeSnipps转换为VB2005/2010 [英] CodeSnipps from C# convert to VB2005/2010

查看:138
本文介绍了来自C#的CodeSnipps转换为VB2005/2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在您的网站上看到了一个非常好的多列组合框".
多列组合框

但是此CodeSnipps是基于C#的,我可以使用VB2010.

您能帮我将此CodeSnipps转换为VB2010吗?

Hello,

I have see on your website a very good "Multi Column ComboBox".
Multi Column ComboBox

but this CodeSnipps on C# and I work with VB2010.

Can you help me this CodeSnipps to translate to VB2010:

protected override void OnDropDown(System.EventArgs e){
   Form parent = this.FindForm();
   if(this.dataTable != null || this.dataRows!= null){
       MultiColumnComboPopup popup = new
                           MultiColumnComboPopup(this.dataTable,
                           ref this.selectedRow,columnsToDisplay);
       popup.AfterRowSelectEvent+=
                           new AfterRowSelectEventHandler
                           (MultiColumnComboBox_AfterSelectEvent);
       popup.Location = new Point(parent.Left +
                           this.Left + 4 ,parent.Top +
                           this.Bottom + this.Height);
       popup.Show();



这必须在我的VB代码中,然后使用CodeSnipps
坎恩,我找到了弹出框.

我的代码中的姓名:
datatable = dtFeldArt
组合框中的名称:mcomFeldArt

我在一些代码翻译器上有代码,但是没有工作和翻译.


感谢您的帮助.



This must in my VB Code, then with the CodeSnipps
kann I locate the popupbox.

Names from my codes:
datatable=dtFeldArt
Name from the combobox: mcomFeldArt

I have the Code on a few code-translater, but there are not working und translate.


Thank you for your help

推荐答案

是否有某些原因需要对其进行转换?除非您使用Visual Studio的Express版本,否则您应该能够在项目中混合语言.
Is there some reason why it has to be converted? Unless you''re working in an Express version of Visual Studio, you should be able to mix languages in your project.


网络中有各种代码转换器.试试这个,例如:
http://www.developerfusion.com/tools/convert/vb-to-csharp/
There are various code-converters in the net. Try this, for example:
http://www.developerfusion.com/tools/convert/vb-to-csharp/


没有2005代码之类的东西. Visual Studio 2005支持.NET Framework v.2.0; 2008和2010的版本是多平台的; Visual Studio 2010支持高达v.4.0的框架.
v.2.0中的代码与v.4.0完全兼容; C#v.4(如果与C#v.2完全向后兼容). (在.NET库中,您可能会收到一些过时的警告,最好替换过时的库组件).

Visual Studio 2010也将接受较旧版本的解决方案和项目文件,并建议您进行自动转换.您真的不需要担心任何事情.

—SA
There is not such thing as 2005 code. Visual Studio 2005 supports .NET Framework v.2.0; the versions of 2008 and 2010 are multi-platform; Visual Studio 2010 supports Frameworks up to v.4.0.
The code in v.2.0 it fully compatible with v.4.0; C# v.4 if fully backward-compatible with C# v.2. (in the .NET library you may get some obsolete warnings, it would be good to replace obsolete library components).

Visual Studio 2010 will also accept solution and project file of older version and will suggest you automatic conversion. You really don''t need to worry about a thing.

—SA


这篇关于来自C#的CodeSnipps转换为VB2005/2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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