Background Image File Location

  • Thread starter Thread starter aiki727 via DotNetMonster.com
  • Start date Start date
A

aiki727 via DotNetMonster.com

Hello everyone,

Where do I store a bitmap or jpeg that I am using for a forms background
image when I deploy the application? Or do I link these files to the app
during the deployment?

Thanks
 
aiki727 via DotNetMonster.com said:
Where do I store a bitmap or jpeg that I am using for a forms background
image when I deploy the application? Or do I link these files to the app
during the deployment?

As a separate file in the application's directory or as an embedded
resource.
 
Hi, aiki727,

If the image is stored in the resource editor (and accessed via the resource manager), then you'll get this for free. The image will get built into the application's resources, and there will be no need for you to bring along the separate files during deployment, or link them, or whatever. Just open the resource editor and add your image, and then set the background image to point to the appropriate image in the resource file. This is the preferred method.

If you are instead writing code which loads in the image at run-time from a file (for whatever reason), then you'd need to handle the images files separately for deployment. For example, for deployment via setup projects, you can either add the image file to the setup project directly, or else add the file to the application's project (making sure that its build action in the property grid is set to "Content") and then add the "Content" project outputs of that application to the setup project.

(This is all assuming you're using VS2005 -- it's pretty much the same for VS2002/3, but I forget the exact steps in those previous versions.)

Hope this helps,
--Matt Gertz--*
VB Compiler Dev Lead

-----Original Message-----
From: aiki727 via DotNetMonster.com
Posted At: Tuesday, November 29, 2005 11:23 AM
Posted To: microsoft.public.dotnet.languages.vb
Conversation: Background Image File Location
Subject: Background Image File Location


Hello everyone,

Where do I store a bitmap or jpeg that I am using for a forms background
image when I deploy the application? Or do I link these files to the app
during the deployment?

Thanks
 
Thanks for the reply.

Another basic question: what are the bin and obj files actually used for?
What are their purposes? I know when designing an app, a text file can be
kept in the bin folder and accessed without a path, just the file name,
because VB looks in the bin folder by default.
 
aiki727 via DotNetMonster.com said:
Another basic question: what are the bin and obj files actually used for?
What are their purposes? I know when designing an app, a text file can be
kept in the bin folder and accessed without a path, just the file name,
because VB looks in the bin folder by default.

You do not need to care about the "obj" folder -- it's used during
compilation of the project, for example. The "bin" folder of the project
contains the compiled executable. You can take the executable of the "bin"
folder and redistribute it, if you compiled the project using the Release
configuration.
 
What is the difference in deploying an application as compared to just
copying the compiled exe in the bin folder? Does the deployment just create
an installer program for the app?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top