Print Page | Close Window

ImageManager Draw Alpha

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14190
Printed Date: 07 October 2024 at 12:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ImageManager Draw Alpha
Posted By: jpbro
Subject: ImageManager Draw Alpha
Date Posted: 30 April 2009 at 6:41pm
Is there a way to draw an icon (PNG) stored in the ImageManager control onto a hDC with an arbitrary alpha level? If not, is there any chance of such a feature?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Replies:
Posted By: Oleg
Date Posted: 01 May 2009 at 2:28am
Hi,
 
have you tried Draw method ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jpbro
Date Posted: 01 May 2009 at 9:54am
Hi Oleg,

I have used the Draw method successfully to draw an icon on an hDC exactly as it appears in the ImageManager, but I don't see any way to change the alpha level arbitrarily using that method...For example:


            UserControl.ImageManager1.Icons.GetImage(100, 16).Draw hdc, Left + l_LeftOffset, Top + l_TopOffset, 16, 16, xtpImageNormal


Draws the image, but I would like to draw it at (for example) 50% transparency...Is this possible?



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Oleg
Date Posted: 04 May 2009 at 12:06am
Hi,
 
No, its not possible. You can only create additional image manually and set it as "xtpImagechecked" state fot this image.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jpbro
Date Posted: 04 May 2009 at 8:06am
If it is technically possible, Adding an extra property to control the alpha level of any icon would be a great feature...For example, it could be used by having a thread to draw a pulsing icon (fade in/fade out), which would not be possible using an extra xtpImageChecked image (and would be a pain to implement by adding dozens of extra icons at various alpha levels).


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net