Solved

How to make 48x48 icons appear larger in VB.NET

Posted on 2011-02-22
8
754 Views
Last Modified: 2012-06-21
Hello Experts -

Is there anyway to increase the display size of a 48x48x32 icon in VB.NET while preserving its quality.

I have tried to "Stretch" the output in a Picturebox to 64x64 and it appears to becoming out fuzzy.

I know it can be done because I have seen renditions of icons by Microsoft that were at least  three times larger than their native display size - and they didn't look that bad.

Any thoughts?
0
Comment
Question by:gbmcneil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34954653
you need a higher-res image. decreasing an image is normally done good but increasing a low-res image is never good.
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 34962662
I have been trying to explain to you in your other question that you want to close. Your using the Icon() class to load the icon then when you draw into the surface it becomes "streched". Even if the icon has multiple supported resolutions. The idea is to figure out if the icon your testing has multiple resolutions because if it does and you use Icon() class you won't draw the correct resolution to the surface.

Using this example do you notice any difference in resoultion?
Dim b As New Bitmap("c:\windows\system32\PerfCenterCpl.ico")
Dim g As Graphics = PictureBox1.CreateGraphics
g.DrawImage(b, 0, 0, 128, 128)
g.Dispose()

Open in new window

0
 

Author Comment

by:gbmcneil
ID: 34962903
Okay. An admission here. How do I load the Icon class?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 34963333
Add PictureBox to Form and 1 button and place the code into button. Do you notice the difference in resolution when running the example below against your previous example?
Dim b As New Bitmap("c:\windows\system32\PerfCenterCpl.ico")
Dim g As Graphics = PictureBox1.CreateGraphics
g.DrawImage(b, 0, 0, 128, 128)
g.Dispose()

Open in new window

0
 

Author Comment

by:gbmcneil
ID: 34963816
If I do as you say, the result is to zoom in on the image - making it appear grainer.
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 250 total points
ID: 34965428
Then it seems that your icon has a max resolution of 64x64. What I am trying to explain is that if the icon had higher resolutions and you still used the Icon Class and DrawIcon then it would still draw into the surface blurred.

The icon "c:\windows\system32\PerfCenterCpl.ico" is a perfect example of microsoft icon with multiple resolutions. But if you had loaded it with the Icon class it would still become blurred when using DrawIcon even though it supports higher resolutions 128x128 256x256

0
 

Author Comment

by:gbmcneil
ID: 34965926
Interesting. It's like a TrueType icon.

But, how do you know its a TrueType icon?  I would think that all the fonts found in Shell.dll (a Microsoft file found in System32) would be expandable.

Is it just trial and error?  Are there any DLLs that house collections of Microsoft's expandable icons?
0
 

Author Closing Comment

by:gbmcneil
ID: 34988157
Thank you for your help.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question