473,378 Members | 1,469 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,378 software developers and data experts.

Where to put images

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
Nov 20 '05 #1
4 1020
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.
-----Original Message-----
I'm new to win forms programming, and am having a bit of trouble figuringout where to place images that will accompany the program. Do you placethem in the bin directory?? What if you are making a control library toaccompany the app, and there are images that accompany the controls? Do youplace them in with the library, but then how is it distributed if thecontrol library is just a .dll?

Sorry if my question is confusing... I'm much more used to web apps.
Tnx,

D
.

Nov 20 '05 #2
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/
mi**@mag37.com

"MC D" <no****@earthtalk.com> wrote in message
news:10*************@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

Nov 20 '05 #3
Cor
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
Nov 20 '05 #4
* "MC D" <no****@earthtalk.com> scripsit:
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.gb l>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

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

Similar topics

2
by: Nat | last post by:
Hi there, I have code as following but it returns error Error Type: Microsoft VBScript compilation (0x800A03F6) Expected 'End' /urbisjhdintranet/metadata/resultList.asp, line 324 which is the...
0
by: Perttu Pulkkinen | last post by:
I am doing a news-oriented multiuser cms, where authors can design html-pages or plaintext-pages and then editor(s) accept them. Also they can load images, at least five - maybe. But I don't know...
0
by: Perttu Pulkkinen | last post by:
I am doing a news-oriented multiuser cms, where authors can design html-pages or plaintext-pages and then editor(s) accept them. Also they can load images, at least five - maybe. But I don't know...
5
by: Applebrown | last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple...
2
by: FrankStallone | last post by:
I am just getting started in XML and I made my first xml, dtd and xslt file and XML spy said they were all valid and they worked. This was the xslt doc that worked. <?xml version="1.0"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.