Technology Microsoft Software & solutions

How to Use VB6 Dll in .NET

    • 1). Locate the DLL file on your computer and add a reference to that file from your VB.NET application. Select "Project" from the menu and then "Add References." The file may exist under the "COM" tab or you may locate the DLL under the "Browse" tab.

    • 2). Select the DLL file and click the "OK" button. This adds a reference to the DLL within your VB.NET project. Create a variable in your application to hold a reference to the DLL object in the VB.NET code.

    • 3). Set the new variable equal to a new instance of the DLL object. Another way to accomplish this is to set the new variable equal to "CreateObject(MyDLLObject)" where "MyDLLObject" is the name of the public class defined in the DLL.

    • 4). Reference any of the public functions defined within the DLL project in your VB.NET application by citing the new variable name, followed by a period and the function name.

    • 5). Set the object reference to "Nothing" before exiting the program in the .NET code. It is important to destroy any object reference used in an application to release it from memory.

Related posts "Technology : Microsoft Software & solutions"

How to Import OCX

Microsoft

How to Install Grub From a Fedora Recovery CD

Microsoft

How to Speed Up Streaming in Vista

Microsoft

How to Fix a Disappearing "Start" Menu, "Start" Button and Task Bar

Microsoft

How Do I Modify Startup in Vista?

Microsoft

How to Change Your Name in CP

Microsoft

How to Use WinImage to Create a Boot Disk ISO

Microsoft

How to Get to a BIOS Screen

Microsoft

How to Control Updates on XP

Microsoft

Leave a Comment