If the graphic image is stored as a resource (or even as a separate image
file) there is only one copy regardless of how many places it is displayed.
Clearly if it is displayed simultaneously in a number of spots then RAM is
used to display each image, that RAM is released when the image is no longer
visible.
The key here is to consider what the presence of the graphic images adds to
your app. Meaning, if it is important, then you need them so what does the
size matter? If you don't care what they look like you can make them
smaller and stretch them and again if that "works for you" then fine. Are
you saving 50K and does anybody really care? Are you talking about a logo
or a splash screen image? If you want them displayed then it takes up some
RAM there is no way around it.
Try to stub out the graphic and see what your .EXE size is, then put it back
into place and see what it is then. Is the difference worth it to you? I'm
going to guess you'll prefer the images. I'll also suggest you don't start
optimizing until the app is finished. A couple of MB's more or less just
isn't an issue these days. This shouldn't be an excuse to "waste" space but
you shouldn't be too concerned about "using" space, that's what it's there
for.
Tom
"Jarry" <Ha***********@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
What are the rules on how VB.Net 2005 packages graphics? If I use the
same graphic in two different picture boxes, does both the images count
towards the final size? What if I start with image really small and
then stretch it to fit the picture box? Is it woth just using colours
if I want to keep file sizes down? Do the grahics make any difference
to the exe file size anyway?
So many questions, so little time. Any help whatsoever would be
appreciated...
Thanks