Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 2nd, 2012, 08:23 PM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: San Antonio, Texas
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Images vs Icons

Hi Rod,
Great book!
In VB6 I could attach ICONS to buttons; how can I attach these same ICONS to buttons in VB.Net. It looks like one can only attach images; if so, is there an image file with standard images like Folder, book, list, etc. that I can download?

Last edited by toconce; July 2nd, 2012 at 08:58 PM.
Reply With Quote
  #2 (permalink)  
Old July 2nd, 2012, 09:44 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,145, Level: 23
Points: 3,145, Level: 23 Points: 3,145, Level: 23 Points: 3,145, Level: 23
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jan 2006
Location: , , .
Posts: 641
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Normally you use some other image file format for button images such as a png or bmp. You can find a ton of standard button images in the Visual Studio Image Library that is installed when you install Visual Studio.

Exactly where it is installed depends on which version of Visual Basic you install but it should look something like:

...\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033\VS2010ImageLi brary.zip.

See Visual Studio Image Library for more details.

If you can't find it, try searching your Program Files directory for *ImageLibrary.zip.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2012, 12:01 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: San Antonio, Texas
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Rod, thanks for the prompt reply,

The free VB 2010 Express version does not include the ImageLibrary. I'll have to wait until I win the lottery before I can purchase the full studio.

But, since I don't give up easily, I was able to attach from my ICON file. When browseing for an image from the control's property, I selected "view all files (*.*)" from the import window, chose the needed ICON and to my surprise it worked. I guess the IDE automatically converted the ICON to BMP, JPEG, or ???? Now if I can find how to change its dimensions to be a little bigger.....

As long as I'm writing this, here is something for the Errata Sheet for the VB 2010 Prgrms Ref book....Page 117, 2nd Paragraph, 3rd sentence, "co mponent" should read "component"

This old die-hard VB6 programer is begining to like the VB.net, mainly due to your book.

Thanks again!
Reply With Quote
  #4 (permalink)  
Old July 3rd, 2012, 10:19 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,145, Level: 23
Points: 3,145, Level: 23 Points: 3,145, Level: 23 Points: 3,145, Level: 23
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jan 2006
Location: , , .
Posts: 641
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Sorry about that. I had forgotten that the image library wasn't included in the Express Editions.

You may be able to download the Visual Studio 2012 RC and pull it out of there. I haven't tried it, though.

To resize, you might be able to find a tool that can do that. Or you can write some code to load the image, resize it, and save it into a new file. See this example:

Resize an image in VB .NET
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
  #5 (permalink)  
Old July 3rd, 2012, 11:39 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: San Antonio, Texas
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Rod, I'll give it a try, both suggestions.

As I continue to learn VB.net ( at 70 yrs old) I'm sure I will be asking for your help again but only when I'm really stuck so as not to bother you too much.

Martin
Reply With Quote
  #6 (permalink)  
Old July 5th, 2012, 01:22 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,145, Level: 23
Points: 3,145, Level: 23 Points: 3,145, Level: 23 Points: 3,145, Level: 23
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jan 2006
Location: , , .
Posts: 641
Thanks: 2
Thanked 96 Times in 95 Posts
Default

It's really no bother. If I get too busy, replies just take a bit longer.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

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


Thread Tools
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
Resource files and images/icons/ not strings! cognizance ASP.NET 2.0 Basics 0 April 11th, 2006 07:43 PM
Disabled icons EricJ VB How-To 0 July 12th, 2005 09:51 AM
Icons in Menu ashu_from_india Pro VB 6 2 June 3rd, 2005 10:58 PM
FaceID and icons amc Excel VBA 1 August 31st, 2004 01:09 PM
Using icons within a userform Stubby Excel VBA 2 July 7th, 2004 08:09 AM



All times are GMT -4. The time now is 08:08 AM.


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