|
-
Jan 24th, 2003, 10:42 AM
#1
Thread Starter
Hyperactive Member
Notification Icon
I can create a notification icon to appear in the Systray, but how do I hide the Icon when the form is showing, show the icon but hide the form when minimized, create a menu on right clicking the icon, and be able to activate the chosen menu item on the notification icon?
Could someone possible point me in the right direction?
Thanks.
Last edited by RealNickyDude; Jan 24th, 2003 at 10:53 AM.
-
Jan 24th, 2003, 10:56 AM
#2
Registered User
I have this in one of my apps, there is some junk depending on what culture info we use, because its built for the swedish market. But I think you can filter out how its done....
Code:
With niFrontend
.Visible = True
Dim ci As System.Globalization.CultureInfo = System.Globalization.CultureInfo.CurrentCulture
Dim mnu(1) As MenuItem
If Strings.Left(ci.Name, 2) = "en" Then
mnu(0) = New MenuItem("Tools...", New EventHandler(AddressOf Me.btnTools_Click))
mnu(1) = New MenuItem("Quit", New EventHandler(AddressOf Me.btnClose_Click))
Else
mnu(0) = New MenuItem("Verktyg...", New EventHandler(AddressOf Me.btnTools_Click))
mnu(1) = New MenuItem("Avsluta", New EventHandler(AddressOf Me.btnClose_Click))
End If
Dim niMenu As New ContextMenu(mnu)
.ContextMenu = niMenu
End With
If you have added your contextmenu at designtime you wouldn't have to do any of this but only to set the contextmenu property of your notification menu to the added context menu.
-
Jan 24th, 2003, 10:58 AM
#3
Thread Starter
Hyperactive Member
Thanks, where would I put this?
-
Jan 24th, 2003, 11:02 AM
#4
Registered User
I had it in the load event of the main form.
-
Jan 24th, 2003, 11:15 AM
#5
Thread Starter
Hyperactive Member
Thanks Athley, I have most of it worked out, just a few questions:
1/. How do I hide the icon when the form is on show?
2/. How do I make the icon visible when the user minimizes the form?
3/. How do I hide the from completely when minimized?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|