Results 1 to 3 of 3

Thread: [RESOLVED] Question on adding images to a project

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Resolved [RESOLVED] Question on adding images to a project

    Hi everyone,

    Just a quick question. If I add an image to the program where the image is listed in solution explorer, do I still have to include the file? Its not embeded in the program right? Just checking.

    Warren

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Question on adding images to a project

    If you simply add the image file to your project in the Solution Explorer then it's just a loose file. In that case you would set its Copy To Output Directory property to True and it will be copied to the output folder along with the EXE for you to deploy. That would make sense if you wanted the user to be able to delete or replace the image file after deployment.

    If you don't want the user to be able to meddle with the image then you should be embedding them as resources. To do that, open the Resources page of the project properties and add the image files as resources. They will still show up in the Solution Explorer in the Resources folder but you can basically just ignore them. In code, you access the images using My.Resources.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Re: Question on adding images to a project

    Thanks! That helps me a lot!

    Warren

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width