Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 11th, 2011, 01:29 PM
Registered User
 
Join Date: Oct 2008
Location: Ashland, MA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2 Exercise 3 - how to add resources

I downloaded the solution, but can't seem to figure out how to add my 2 .gif images properly. The Example has the two .png files added as resources. How do you do that?

Many Thanks,
Jim

Great book and accompanying presentations. If you had an audio only version the presentations woudl blegood reviews to listen to in the car.
  #2 (permalink)  
Old April 11th, 2011, 02:31 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Hi Jim,

It depends a bit on what you want to do with the files. Two common reasons are (1) to manage the file with the rest of the project and (2) to use it as an image in a PictureBox or something similar.

(1) To manage the file with the rest of the project. For example, you might want to set the file's "Copy to Output Directory" property to True so it gets copied into the executable directory so the exe can find it easily.

To do this, open the Project menu and select Add Existing Item. (Alternatively right-click the project in Solution Explorer, open the Add submenu, and select Existing Item.) Select the file and click Add.

Now you can click the file in Solution Explorer and set Copy to Output Directory. Depending on the version of Visual Studio, you may also be able to double-click the file to open it in an editor.

(2) To display the file in a PictureBox. First, you don't need to add the file to the project in the way described above.

Click on the PictureBox. In the Properties window, click on the Image property, and then click on the ellipsis to the right. A dialog appears showing images that have already been imported for use. If the image you want isn't there (it won't be initially), click the Import button, find the file, and click Open.

Now the image should appear in the list of imported files. Select it and click OK to use it as the PictureBox's image.

You may then want to set the PictureBox's SizeMode property, for example to AutoSize or Zoom.

Let me know if that doesn't answer your question.

Quote:
Great book and accompanying presentations. If you had an audio only version the presentations woudl blegood reviews to listen to in the car.
I'm glad you're finding it useful. Post a review when you get a chance!

I'll have to think about audio-only material. It would have to be a topic where you don't need to see anything to make sense of it. It might also be good if it weren't too distracting so you don't crash your car while listening . It might be good for broad principle, background, and design topics, though. Hmm...
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 exercise 2 weekapaugh BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 2 March 11th, 2010 02:28 AM
Chapter 4 Exercise 4 Will BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 2 September 18th, 2009 11:08 AM
chapter 3 exercise 4 walkamongus BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 September 10th, 2007 09:34 PM
chapter 9 exercise michaelcode BOOK: Beginning ASP.NET 1.0 1 April 9th, 2006 03:56 PM
Chapter 3 Exercise 3 Matt WAXON BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 July 4th, 2005 02:19 AM



All times are GMT -4. The time now is 11:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.