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..?
(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.
I love dlls. Thanks you for the simple tut, hopefully people will learn from this :D
great tut,thankyou this is a good tut
(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 👍
Cool! Could people get the code out of the .DLL file by using a decompiler? Would be great to store the .DLL in resources and know that none could get my code 😉
Is there a way to include a form control such as a Button in a .DLL? I mean so that you could have a sub in the class library that declares x as a button.
(Aug 19, 2010 09:56 AM)fredde_jason Wrote:  Cool! Could people get the code out of the .DLL file by using a decompiler? Would be great to store the .DLL in resources and know that none could get my code 😉

I didn't try to decompile a dll but I believe that it can be decompiled.


(Aug 19, 2010 05:59 PM)TDollinger Wrote:  Is there a way to include a form control such as a Button in a .DLL? I mean so that you could have a sub in the class library that declares x as a button.

yes you can make you own controls such as buttons then you compile it into a dll so you can use it easily on other projects 😉
how would you use this if say the dll needed a textbox?

so like how would you get a basice login system to work with this?
I think it's almost bad if you didn't know this and you called yourself a programmer previously.


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