Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
3.67/5 (3 votes)
See more:
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();


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
Posted

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.
 
Share this answer
 
There are various code-converters in the net. Try this, for example:
http://www.developerfusion.com/tools/convert/vb-to-csharp/
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900