Print Page | Close Window

TrayIcon usage

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9739
Printed Date: 16 November 2024 at 1:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TrayIcon usage
Posted By: ikaney
Subject: TrayIcon usage
Date 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.



Replies:
Posted By: Bernie
Date 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


Posted By: ikaney
Date 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 :)


Posted By: gaudetm
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net