Time to retire VB6: What is a good alternative?

As much as I hate to do it, I think I need to consider re-writing my old VB6 programs into a more modern language. Are there any open source programs that are close to VB6? I don’t need any more functionality than VB6 offers, I just need something that will work in the future. Here is a typical form:

Any suggestions? Is there a way that Python can work with forms like this? (Pardon my python ignorance, I’m just starting to get into learning it)

Thanks,

Dan

Have you considered VB.NET with WinFoms - my guess it is the smallest step from VB6 yet supported by the .NET framework. This will not go away any time soon, plus you get the benefit of having access to the .NET interface to Rhino, RhinoCommon.

Python can support such forms with, e.g., WxWidgets. (NOT supported in Rhino)

I am not a big fan of Visual Basic .NET syntax, but if you know VB6, you might has an easier transition to it.

I totally agree with Dale, if you’re learning a new language anyway and are transitioning from VB6 I can recommend C#. The syntax is more readable and clean compared to VB.NET.

It is possible to translate VB.NET code to C# though - many online translators are available, e.g. http://converter.telerik.com/ Because VB.NET and C# both target the .NET framework, it is very straightforward to translate between the two.

Python in Rhino does not support wxWidgets; that being said I would agree with Menno and Dale that VB.NET or C# with WinForms would be the best route to go. Technically there is very little difference in what can be done between C# and VB.NET; it is mostly a choice of what syntax you are most comfortable with.

Thank you for the feedback.

Will the free Express editions suffice for a project like this, or would I need to purchase the software (VB.net or C#?)

It might help to know that the toughest thing these programs are doing is creating a text file (G-code for the CNC machines) so there is no “rocket science” here. If it wasn’t for needing a user interface as shown, I could do everything I need to do with VBScript/Rhinoscript.

Thanks,

Dan

The free express editions ‘should’ work. I can’t be absolutely certain since I don’t have the express editions currently installed, but they worked for typical plug-in development last time I checked.

Express versions work fine :slight_smile: Using them myself. Haven’t found a thing I cant make with it. :smile:
Do install the SDK for it.

Can you explain a little more about what you mean by this comment?

Nothing serious.

I installed the express version but it was hard to find rhino’s SDK for express. Most of the downloads that are on the site are for the normal version and doesnt recognize the express version :slight_smile:

What downloads on what site? I’m still a little unsure what you are writing about. The reason I’m asking is if there is something that needs tuning up or needs to be easier to find, I would like to know about it so we can improve the process.

The site says this:

 NOTE: RhinoCommon is the new .NET plug-in SDK for Rhino 5.
Rhino.NET will NOT be available in Rhino 6. Use RhinoCommon if possible

The Rhino.NET SDK is designed to allow .NET developers to create Rhino plug-ins with the same capabilities as Rhino C++ SDK developers.
.NET Framework Plug-In Development (Rhino 4 and 5)

Rhino ships with the necessary components to enable Rhino.NET plug-ins on users computers. Plug-ins can be created with a compiler that compiles assemblies using .NET 2.0, including:

Microsoft Visual C# and Microsoft Visual VB.NET 2005 and 2008 (including Microsoft Visual Studio Express editions)
Microsoft Visual C# and Microsoft Visual VB.NET 2010 are supported on Rhino 5
SharpDevelop 2.0 and above

What is the Rhino.NET SDK?

Rhino.Net SDK helps developers to extend Rhino’s functionality using ‘Rhino plug-ins’. The Rhino.NET SDK provides the tools to develop Rhino plug-ins using a .NET programming language. This means that Rhino plug-ins can now be developed using VB.NET, C#, C++.NET, Delphi.NET (and the list goes on).

The Rhino.NET SDK is actually a wrapper around the Rhino C++ SDK. Most of the classes and methods provided by the C++ SDK are available through .NET.
Where is the Rhino.NET SDK?

The Rhino.NET SDK an assembly named Rhino_DotNET.dll located in the Rhino system directory. The Rhino_DotNET.dll assembly is what all Rhino.NET plug-ins reference to get exported classes and functions from Rhino. This file is installed with Rhino and is not a separate download.
Questions

Post questions or read other people’s questions/answers at http://discourse.mcneel.com/

Some of your questions may be answered by the DotNET Essentials page

source: http://wiki.mcneel.com/developer/dotnetplugins

But if you open Microsoft Visual Studio Express you can’t imediately start making rhino plugins because you need to install rhinocommon/rhino sdk. Where do you download this?

I can find it now easily but when I started it was a bit of searching.

A direct link to the download page for the template would be easier

Thanks. That page needs to be restyled. It has a link at the top to “RhinoCommon” - http://wiki.mcneel.com/developer/rhinocommon which is supposed to be the main landing page for .NET based development in Rhino (I removed the link to the page that you are looking at in the main wiki index, but apparently it is still pretty easy to find.)

I appreciate all the feedback.

Looks like I know what I’ll be doing in my spare time in 2014!

Ha ha, spare time, I should have been a comedian! :slight_smile:

Dan

1 Like

Hi Dan,
you mentioned, that you could create your gcode perfectly well in Rhinoscript. So why not use Python in combination with Windows Forms for the UI? Last time I checked, that was perfectly possible and should be much easier. You can actually use SharpDevelop to style your UI and output the IronPython code and copy that into your Rhino python script.

Thanks for that suggestion. I will look into this.

Dan