Well you can use the class if you make it a ComClass with this technique
you are able to use it in anny com capable programming language ( VB6 ,
Delphi , Clipper :-) etc etc
it is also still possible to use it in the normall way in VB.Net
see below example class wich is copied from a reall life project of mine
( ofcourse i have changed the ClassId, InterfaceId and EventsId if someone
might copy it in his own project he won`t break my compatibility , so i
strongly encourage you to change the 3 guids to your own )
<ComClass(ComClsNhsenc.ClassId, ComClsNhsenc.InterfaceId,
ComClsNhsenc.EventsId)> _
Public Class ComClsNhsenc
Public Function strEncrypt(ByVal strToEncrypt As String) As String
' code omitted
End Function
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "7BAE16DC-0103-4BA3-9B89-53252272X711"
Public Const InterfaceId As String = "3CE4FCBF-CDEA-4849-9743-0E8E34D313AE"
Public Const EventsId As String = "7E90HE2E-8F8C-45B2-870B-3461A7DF28A7"
#End Region
' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.
Public Sub New()
MyBase.New()
End Sub
End Class
Happy coding : -)
Michel Posseth [MCP --- and proud of it --- :-) ]
"Supra" <su*****@rogers.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
sure! this will show u how to make dll.
http://www.devcity.net/Articles/87/s...omcontrol.aspx
http://www.devcity.net/Articles/82/s...thebutton.aspx
regards
Phil Galey wrote:
Is it possible to create a DLL from VB.NET that is referenceable from
VB6?If so, how? I tried creating a Class Library project. It can be
referencedfine from VB.NET, but not from VB6. Thanks.