Print Page | Close Window

ImageManager / Image control

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=8399
Printed Date: 18 June 2025 at 9:42am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ImageManager / Image control
Posted By: indices
Subject: ImageManager / Image control
Date Posted: 10 October 2007 at 10:14pm
How can I display an image, which is stored in the ImageManager control, in a VB6 image control or picture control?
 
I tried:
Set imgPlay.Picture = Me.ImageManagerPanel.Icons.GetImage(3003, 20).CreatePicture(xtpImageNormal)
 
That does not work. Can this be done? Thanks.



Replies:
Posted By: Oleg
Date Posted: 11 October 2007 at 12:41am
You can draw it directly:
 
Private Sub picSample_Paint()
    Dim Icon As ImageManagerIcon
    Set Icon = frmMain.CommandBars.Icons.GetImage(100, 16)
   
    If Not Icon Is Nothing Then
        Icon.Draw picSample.hDC, 0, 0, Icon.Width, Icon.Height, xtpImageNormal
    End If
End Sub


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


Posted By: indices
Date Posted: 11 October 2007 at 1:02pm
Hi Oleg,
Thank you for responding.
 
That approach works for picture boxes it doesn't work for image object which does not have an HDc.
 
I want to transfer the imagemanger picture directly to an image object since it has transparency. I could get it to work by copying it to a picture box and then copying it from there to the image object but that loses transparency.
 
Is it possible to copy it to the image object without losing transparency.
Thanks.


Posted By: Oleg
Date Posted: 12 October 2007 at 8:37am
Hi,
 
If you have 11.2 version you can use our Label control to draw Icon. just sset its Icon property.


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



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