Use a DLL in VB.NET which is created in VB.NET
---------------------------------------
Start a new project (Windows Application) and Code
Then : Project -> Add Reference -> locate DLL created in VB.NET and press "Ok"-button.
--------------------------------------------------------
Imports System
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim obj As New ClassLibrary1.Class1
Dim a() As Integer = {20, 21}
Dim b() As Integer = {0, 0}
Dim i As Integer
obj.Main(a, b) 'DLL function calling
For Each i In b
MessageBox.Show(i.ToString)
Next
End Sub
End Class
----------------------------------------------------------------------
Form1 has button1 which will call main funcion of DLL.
Also See : How to create dll in VB.NET
No comments:
Post a Comment