Solved

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

Posted on 2013-06-06
1
393 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 500 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
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…

717 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