Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - CodeJock ImageManager question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CodeJock ImageManager question

 Post Reply Post Reply
Author
Message
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Topic: CodeJock ImageManager question
    Posted: 22 September 2007 at 12:10am
Hello everyone!
 
I am trying to replace VB's ImageList with CodeJock ImageManager. I get "Object variable not set" error. Variable TrayIcon remains empty.
 
Can you show me where is my mistake in the following lines:
 

Dim TrayIcon As ImageManagerIcon
 
 
Set TrayIcon = imlMenuIcons.Icons.GetImage(ID_BUY_NOW_FROM_APP_MENU, 0)
TrayMenu.ItemPicture(1) = TrayIcon.CreatePicture(xtpImageNormal)
 
Eugene
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 3:49pm
What is TrayMenu?
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 4:23pm
Originally posted by SuperMario SuperMario wrote:

What is TrayMenu?
 
It's a 3rd party component from DBI-Tech. The ItemPicture property type is StdPicture. So, I just need to supply an StdPicture to it, by using the CreatePicture method of CodeJock ImageManager. But I don't see why it doesn't work.
Eugene V
A happy registered user of Xtreme SuitePro 2007 11.2.0 with VB6
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 4:29pm
This worked for me:

    Dim mystdpic As StdPicture
    Set mystdpic = ImageManager.Icons.GetImage(100, 16).CreatePicture(xtpImageNormal)
   
    Picture1.Picture = mystdpic


Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 4:30pm
Note Picture1 is a standard picturebox control.
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 9:17pm
Originally posted by SuperMario SuperMario wrote:

This worked for me:

    Dim mystdpic As StdPicture
    Set mystdpic = ImageManager.Icons.GetImage(100, 16).CreatePicture(xtpImageNormal)
   
    Picture1.Picture = mystdpic


 
I am sorry, but there is no data type named StdPicture in VB. This cannot be compiled. Any ideas?
Eugene V
A happy registered user of Xtreme SuitePro 2007 11.2.0 with VB6
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2007 at 9:23pm
Sorry, my mistake. You need to add a reference to "OLE Automation" in order to use this data type.
Eugene V
A happy registered user of Xtreme SuitePro 2007 11.2.0 with VB6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.