![]() |
ImageManager / Image control |
Post Reply ![]() |
Author | |
indices ![]() Groupie ![]() Joined: 21 September 2007 Location: India Status: Offline Points: 44 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
indices ![]() Groupie ![]() Joined: 21 September 2007 Location: India Status: Offline Points: 44 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |