Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - TrayIcon Icon property
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TrayIcon Icon property

 Post Reply Post Reply
Author
Message Reverse Sort Order
MattM View Drop Down
Newbie
Newbie


Joined: 13 May 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote MattM Quote  Post ReplyReply Direct Link To This Post Topic: TrayIcon Icon property
    Posted: 13 May 2009 at 5:01pm
Thanks Aaron,

I was not using the CreatePicture method.
This VBScript works fine.

TrayIcon1.Text = "Desyntime 2.0"
CaptionImageManager1.Icons.LoadIcon "C:\DesynTimeUpdated\DesynTime\256.ico", 1, 0
Set TrayIcon1.Icon = CaptionImageManager1.Icons.GetImage(1, 16).CreatePicture(xtpImageNormal)
TrayIcon1.MinimizeToTray AD.Field("WindowL<WindowHandle>")
TrayIcon1.ShowBalloonTip 2, "Desyntime is still running", "Click the icon to show the window again", 1

Matt
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2009 at 4:06pm
Hi,
 
I tried the following options and they all work OK:
 
  1. TrayIcon1.Icon = LoadPicture(App.Path & "\Icons\Delete.ico")
  2. TrayIcon1.Icon = ImageManager.Icons.GetImage(1, 16).CreatePicture(xtpImageNormal)
  3. TrayIcon1.Icon = Me.Icon
  4. TrayIcon1.Icon = PictureBox.Picture
       
Hope this helps
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
MattM View Drop Down
Newbie
Newbie


Joined: 13 May 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote MattM Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2009 at 12:17pm
I am using the TrayIcon control with a development tool which uses VBScript to manipulate the properties on the panel.

Refering to the documentation for the TrayIcon control I see that the Icon property expects a "Picture" object. The code sample only demonstrates using the VB form's icon, but I want to set the icon as part of the application's configuration.

I have tried using the VBScript LoadPicture function but get a type mismatch error.

TrayIcon1.Icon = LoadPicture("C:\256.ico")

I also tried using the image manager control without success.
Set MyPicture = CaptionImageManager1.Icons.GetImage(1,16)

What type is the Icon property and how can I populate it on the fly from a file on disk?


thanks,

matt
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.188 seconds.