Search This Blog

Wednesday, February 3, 2010

Using DLL in VB.NET

How to use DLL in VB.NET?
Answer:  DllImport

example code:

Public class use_dll
   'FUNCTION
    _
        Public Function fun_1(ByVal Str As String, _
        byVal ingr as integer) As integer
    End Function


'SUB
                                       _
                                          Public SUB fun_2(ByVal Str As String, _
        byVal ingr as integer) 

    End Sub

'event on some button click
fun_2()
messagebox.show(fun_1().tostring)
end class

No comments:

Post a Comment