Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I call a visual basic 6.0 method in c#?

I would like to call a method which is written in visual basic 6.0 from c# (visual studio 2008). Is it possible? How would I do it?

like image 747
ratty Avatar asked Nov 30 '10 05:11

ratty


People also ask

How do you call a method in Visual Basic?

The syntax for calling a function in VB and VBA is lvalue = functionName (argument1, argument2) . If there is more than one argument (like in this example), you'll separate the arguments with commas. You must provide values for all arguments that aren't optional.

What is Visual Basic 6.0 used for?

Abstract. Visual Basic is a part of the Microsoft Visual Studio and is the flagship development language for Microsoft. You can develop applications for a stand—alone or networked computer system, you can create your own controls and even develop applications for the Internet.

When you start Visual Basic 6.0 the default selected project is?

Notice that new Visual Basic projects start with a default name of Project1. The project also contains one form that has a default name of Form1.

Is Visual Basic 6.0 still used?

The Visual Basic 6.0 IDE is no longer supported as of April 8, 2008.


1 Answers

Easiest way to do it is to just compile the VB6 code as an ActiveX DLL. Then you can reference the DLL in your .net project. (Visual studio can reference ActiveX DLLs properly.)

like image 88
Yochai Timmer Avatar answered Oct 09 '22 03:10

Yochai Timmer