?
Solved

A way to change the alpha of the icon before Graphics.DrawIcon?

Posted on 2013-06-06
1
Medium Priority
?
394 Views
Last Modified: 2013-06-06
Hello, I am drawing an icon to the screen with:

pe.Graphics.DrawIcon(My.Resources.MyIcon, x, y)

I was wondering if there was a way to adjust the alpha of the icon to a desired number before drawing, like the following imaginary code that fades it in:

for n as integer = 1 to 255
dim alpha_icon as new icon(My.Resources.MyIcon)
alpha_icon.SetAlpha(n)
pe.Graphics.DrawIcon(alpha_icon, x, y)
next n

I have seen ways to do this with image resources, haven't been able to find an equivalent for icons.

Thanks for any help.
0
Comment
Question by:RonMexico
[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
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39225296
An icon is just a special bitmap. Try loading a copy of the resource into a Bitmap instance; then fiddle with the alpha there.
0

Featured Post

AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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