Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT] Create a DLL and Use It In Your Application [VB.NET]

Hi Guys
Today I'll show you how to create a DLL and use it in your application instead of writing the full code in your project.


Step 1:

Create a New Class Library as Shown below

Spoiler (Click to View)

Step 2:

Name the class as you want then add your code as shown below

Spoiler (Click to View)

As you can see, my code is a simple Math operations and you can add your own code. So let's build it and close VS.
You'll find your dll in the release folder


Step 3:

Now our Dll is ready to use so let's make an application which will use the Dll.

Spoiler (Click to View)

Step 4:

Now we have to add a reference to our Dll


GoTo Project -> Add Reference, and browse to where your Dll is located.

Spoiler (Click to View)

Step 5:

Ok, Now let's write our application and don't forget to import the Dll

Spoiler (Click to View)

Now we're done. so let's compile the project and test it.

Result:
Spoiler (Click to View)

Ok, that's it. Now I need your feedback
Thanks for reading
🤝
Thanks i was looking for something like this.
(Aug 18, 2010 01:13 PM)DisconnectionModsss Wrote:  Thanks i was looking for something like this.

You're welcome buddy 🤝
Very Nice Tutorial!
Thanks :D
(Aug 18, 2010 01:17 PM)The End Gamer Wrote:  Very Nice Tutorial!
Thanks :D
you're welcome bro!
I hope you've learned something.
hehe nice ;) can i actually put everykind of code in it .. example i could place there

a sub ?

example the sub with file open etc..?
You don't even need to have Class1.vb or whatever it is that is created when you make the project. You can trash that and add a UserControl if you don't want to program. It will still compile as a DLL and works just fine.
(Aug 18, 2010 03:23 PM)Meerds1 Wrote:  hehe nice ;) can i actually put everykind of code in it .. example i could place there

a sub ?

example the sub with file open etc..?

I believe you can bro!
This just an example where I'm using functions and you can put whatever you want and if you're familiar with GDI you can create some cool controls such as themes, buttons....etc and compile it as a dll 😉


(Aug 18, 2010 03:25 PM)Aeonhack Archivist Wrote:  You don't even need to have Class1.vb or whatever it is that is created when you make the project. You can trash that and add a UserControl if you don't want to program. It will still compile as a DLL and works just fine.

I'm not sure on what dll you're talking about but if you're talking about that one which is located the debug or release folder then you're totally wrong😠. it's not even a dll.
If you create a Class Library and not a Windows Form App, when you compile, it should create a DLL and not an EXE. What I meant by "Class1.vb" was the default file that is created when you make a new Class Library. You don't have to manually code everything. For people who don't feel confident in doing that, they can delete the default file and add a New UserControl and create their control on there. When they compile it, it should compile as a DLL.
Nice, i just made my 1st dll that works lmfao, i made a web client dll that makes getting / downloading shit easier (just as a test)
I love dlls. Thanks you for the simple tut, hopefully people will learn from this :D
great tut,thankyou this is a good tut
Interesting stuff !
Thanks for sharing
(Aug 18, 2010 06:56 PM)Oxycodone Wrote:  Nice, i just made my 1st dll that works lmfao, i made a web client dll that makes getting / downloading shit easier (just as a test)

Good for you buddy! keep it up 👍
Nice tut, thanks =)

I needed the code for calc lol
jk
but still
good tut =d
- HB ---STEAM -
[Image: zUBs1FH.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by HackooJun 19, 2022 11:05 AM 0 215 Jun 19, 2022 11:05 AM
Last Post: Hackoo
[C] by SecurifierJan 17, 2020 07:20 AM 12 416 Jan 17, 2020 07:20 AM
Last Post: SIM-3602340
[Java] by TennoFeb 3, 2019 04:49 AM 4 307 Feb 3, 2019 04:49 AM
Last Post: Tenno