![]() |
TrayIcon Icon property |
Post Reply
|
| Author | |
MattM
Newbie
Joined: 13 May 2009 Location: United Kingdom Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: TrayIcon Icon propertyPosted: 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 |
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 May 2009 at 4:06pm |
|
Hi,
I tried the following options and they all work OK:
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.... |
|
![]() |
|
MattM
Newbie
Joined: 13 May 2009 Location: United Kingdom Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
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 |