473,230 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

Creating DLL in VB.net

cvh
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma As
Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function
Jul 21 '05 #1
7 3220
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #2
Start a new class library project instead of a windows application project.

Chris

"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #3
cvh
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function


Jul 21 '05 #4
First, if that's all you want to do, I would recommend creating a Structure,
rather than a Class. Second, you should use the & for concatenation instead
of +. Third, instead of CStr(), you should use CType(currentObj, newType).

As for your main question, are you using Visual Studio.NET? If so, just go
to the Build menu and build your solution. If not, you'll need to use the
Visual Basic compiler (vbc.exe) at the command prompt. Type vbc /? to get a
list of all the compiler switches you can use.
"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #5
Just build it like you would any other project. The dll will be in the bin
folder.

Chris

"cvh" <Ch***@nomail.com> wrote in message
news:uC**************@TK2MSFTNGP09.phx.gbl...
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal
PrPma As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function



Jul 21 '05 #6
There is no need to export any functions

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:uC**************@TK2MSFTNGP09.phx.gbl ...
And how do I build the Dll?

Do I need export the functions?
"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi,

You must create a new project - Class Library

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"cvh" <Ch***@nomail.com> je napisal v sporočilo
news:el**************@TK2MSFTNGP09.phx.gbl ...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal
PrPma As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function



Jul 21 '05 #7
cvh
Thanks for the help guys.
"cvh" <Ch***@nomail.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer

Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma
As Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub

Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function

Jul 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rdsteph | last post by:
Python411 is a series of podcasts about Python, aimed at hobbyists and others who are learning Python. Each episode focuses on one aspect of learning Python, or one kind of Python programming, and...
6
by: owen | last post by:
Generally speaking, what does it mean when I see a "button" with red text showing this message instead of the control I've dragged onto the web form in Design View.? (But the page works fine at...
2
by: Pawan | last post by:
Hi Guys, I have this current assignment where I have to develop online forms for local municipal authorities. I have to use adobe acrobat to create online forms from PDFs (which I have never done...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
2
by: LIN | last post by:
Hello, Greetings. I am creating a web site which will contain lot of articles. I had been planning to create simple HTML page on the server everytime i posted a article (eg. article12.html )....
2
by: Patrick | last post by:
I want to define a set of web-form templates in XML and render the equivalent web-form with ASP.NET, then process any input server controls on the form. Reading the XML file from Page_load is...
0
by: Ravi Ambros Wallau | last post by:
Hi: I've created a custom control - a grid that uses Infragistics to display some filters, the grid itself, and some buttons. Well, when using this control directly on WebForm, everything works...
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
9
by: =?Utf-8?B?YmJn?= | last post by:
Hi all, I read somewhere "using kernel stuff in thread is not good.." if ManualResetEvent object is created in thread but not actually used, will it affect performance? Bob
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.