vb.net:
If you add images to a PictureBox or ImageList they are
automatically added to project resources internally. You
will no longer need the external file. If you code to
link to files then that's a whole other issue.
[quoted text, click to view] >-----Original Message-----
>I'm new to win forms programming, and am having a bit of
trouble figuring
>out where to place images that will accompany the
program. Do you place
>them in the bin directory?? What if you are making a
control library to
>accompany the app, and there are images that accompany
the controls? Do you
>place them in with the library, but then how is it
distributed if the
>control library is just a .dll?
>
>Sorry if my question is confusing... I'm much more used
to web apps.
>
>Tnx,
>
>D
>
>
>.
I'm new to win forms programming, and am having a bit of trouble figuring
out where to place images that will accompany the program. Do you place
them in the bin directory?? What if you are making a control library to
accompany the app, and there are images that accompany the controls? Do you
place them in with the library, but then how is it distributed if the
control library is just a .dll?
Sorry if my question is confusing... I'm much more used to web apps.
Tnx,
D
There are several options, I like embedding them as a resource in the .exe
or .dll where they are used. Then, they are distributed in that binary (not
as separate files).
Here's a tutorial on how to do it:
http://www.codeproject.com/dotnet/embeddedresources.asp Hope that helps.
--
Mike Mayer - Visual C# MVP
http://www.mag37.com/csharp/ mike@mag37.com
[quoted text, click to view] "MC D" <nospam@earthtalk.com> wrote in message
news:101p12t3j9h4k92@corp.supernews.com...
> I'm new to win forms programming, and am having a bit of trouble figuring
> out where to place images that will accompany the program. Do you place
> them in the bin directory?? What if you are making a control library to
> accompany the app, and there are images that accompany the controls? Do
you
> place them in with the library, but then how is it distributed if the
> control library is just a .dll?
>
> Sorry if my question is confusing... I'm much more used to web apps.
>
> Tnx,
>
> D
>
>
Hi MC
If you create your project do not botter direct where are the pictures.
In VS.net is also provided the setup and deployment projects.
Things as you now are asking are there done by default or by setting as you
wish.
(Normaly in the program folder).
I hope this helps,
Cor
* "MC D" <nospam@earthtalk.com> scripsit:
[quoted text, click to view] > I'm new to win forms programming, and am having a bit of trouble figuring
> out where to place images that will accompany the program. Do you place
> them in the bin directory?? What if you are making a control library to
> accompany the app, and there are images that accompany the controls? Do you
> place them in with the library, but then how is it distributed if the
> control library is just a .dll?
For "small" images you can embed them into the DLL:
<
http://groups.google.de/groups?selm=uwt1L0KaDHA.1644%40TK2MSFTNGP10.phx.gbl>
--
Herfried K. Wagner [MVP]