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

TrayIcon usage

 Post Reply Post Reply
Author
Message
ikaney View Drop Down
Newbie
Newbie


Joined: 15 June 2007
Location: United Kingdom
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ikaney Quote  Post ReplyReply Direct Link To This Post Topic: TrayIcon usage
    Posted: 29 February 2008 at 6:18am

Apologies for such a simplistic post, I've used several of the other Codejock controls with no issue however I'm having major issues with the TrayIcon control in VB.Net. I can't seem to find an example program in the usual location to help me.

I've tried all sorts to get my program to minimize to the system tray with a specified icon but it just won't play ball. I'm setting the .Icon property with System.Drawing.Icon and populating it from an embedded resource but when I call the .MinimizeToTray function the application shrinks as it should but no icon appears in the system tray.
 
Any ideas? Or should I not even be using this in VB.Net? Thanks in advance.
Back to Top
Bernie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 July 2007
Location: Taiwan
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bernie Quote  Post ReplyReply Direct Link To This Post Posted: 29 February 2008 at 8:06pm

In my computer, these codes can work.

Private Sub Form_Load()
      Set TrayIcon1.Icon = Me.Icon
      TrayIcon1.MinimizeToTray Me.hWnd
End Sub

Bernie Ho, Planning Manager + IELTS specialist + part-time programmer
Taiwan, R.O.C
Back to Top
ikaney View Drop Down
Newbie
Newbie


Joined: 15 June 2007
Location: United Kingdom
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ikaney Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2008 at 6:50pm
Yeah, I think that's VB6 isn't it? I'm attempting to use them in VB.Net and it just isn't playing ball at all.

I've reverted to using NotifyIcon for the time being unless somebody can help me.

Thanks for your reply :)
Back to Top
gaudetm View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 September 2006
Location: Canada
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote gaudetm Quote  Post ReplyReply Direct Link To This Post Posted: 21 March 2008 at 11:35am
I do that in the form resize event so when the user clic on the minimize button of the form the form is hidden to the system tray but i put the code from the button in the sample to the double click event of the trayicon control and the application crash when i double clic on the trayicon.
 
Any code to do that without the minimize button on the form I want to use the minimze button of the captonbar and double click on the tray icon to restore form back to previous visibility and position.
 
Thanks
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.141 seconds.