At my workplace I’m stuck with Visual Basic 6, but after reading the answer to ‘How do I sort arrays using vbscript?‘ I got my hopes up, that at least some of the missing VB6 features can be supplemented by .NET features. (Different kinds of collections, mostly)
It seems, that at least some .NET classes are available for scripting and can be used from VB6 through CreateObject. But I get a distinct to-good-to-be-true feeling, so…
- Are there any pitfalls I might encounter? (Besides that .NET has to be installed)
- Are all .NET classes available through
CreateObject? - Is there any way to import those classes into my VB6 project, so I can have IntelliSense?
- Do you have any general suggestions regarding this approach?
There’s lot’s of information available at the VB Fusion Developer Center on MSDN. Of particular interest will be Using the .NET Framework Class Library from Visual Basic 6 and Can I Interest You in 5000 Classes?.
You’ll need to write some code in .NET to use the techniques described in the articles. If you don’t already have Visual Studio 2008, you can download Visual Basic 2008 Express for free.