Page 1 of 1

Very simple image dll no coding required

Posted: Sat Sep 18, 2010 5:52 pm
by XTechVB
hi i've got an idea today i didn't thought that it will work but it did

in this tutorial i will show you how to store an image in a dll file and load it in your project
Absolutely no coding required

i repeat this is the simple way

Create the dll
1. create a new classlibrary project and name it what ever you want
2. go to Project--Add UserControl
3. pot an imagebox on the usercontrol and set its dock property to Fill
4. Delete the class (it has to remain only the UserControl)
5. load your image in the picturebox and debug/build your app

Add to windows form
1. create a new project
2. go to Toolbox -- Chose Toolbox Items --Browse ----> select the dll that you created
3. Go to you Toolbox and you will find a new control with your dll name
4. Drag it in to your form and that's it your image will appear there


I don't know if someone else did this(if you find it elsewhere you have my word that I've not copied it its pure coincidence)

That's it guys i hope you like it is not very advanced but it could prove very useful to someone..... someday

Re: Very simple image dll no coding required

Posted: Mon Sep 20, 2010 4:28 am
by zachman61
ooh good job :D
i saw one here a few months ago but it required code and i dont think it worked
question.
can we do it with more than 1 usercontrol?

Re: Very simple image dll no coding required

Posted: Mon Sep 20, 2010 6:00 am
by Axel
hmm useless i think :D
and i hate projects/dll's without coding -.-

Re: Very simple image dll no coding required

Posted: Mon Sep 20, 2010 2:17 pm
by Codex
why have a dll when you can just add a picturebox to your form which is ALOT more simple.

i guess people prefer coding instead of having 10 + dll's just to change image...

Re: Very simple image dll no coding required

Posted: Mon Sep 20, 2010 2:45 pm
by Axel
CodexVideos wrote:
why have a dll when you can just add a picturebox to your form which is ALOT more simple.

i guess people prefer coding instead of having 10 + dll's just to change image...
yeah instead of :
Code: Select all
panel.controls.add(usercontrol20)
panel.controls.remove(usercontrol19)
panel.controls.usercontrol20.size = 50,50
Code: Select all
panel.backgroundimage = properties.resources.Img20;
ALOT easyer + safer+less kilobytes

Re: Very simple image dll no coding required

Posted: Wed Sep 22, 2010 11:42 pm
by zachman61
YourSocksRoxx, just killed the topic :D
still dll does save spot in the project for other stuff