|
-
July 14th, 2008, 01:57 PM
#1
NotifyIcon Bug?
Even thought I have ShowInTaskBar = false, when I minimize my form it goes into SystemTray like it is suppose to, but the Window minimizes over the Task Bar on the Bottom Left.
Using VB .Net 2008 Express Edition
-
July 14th, 2008, 02:38 PM
#2
Re: NotifyIcon Bug?
I must confess I haven't looked at the way that Notify Icon works in VB.NET yet, but if it's like in VB6, then the form doesn't not actually minimise to the system tray - the best bet is to hide it when it is minimised...
I'll just have a quick play around (coincidentially, it's the next thing I need to do on my current project), and see if there's a neater way of doing it.
Last edited by javajawa; July 14th, 2008 at 02:41 PM.
Help from me is always guaranteed!*
VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.
*Guarantee may not be honoured.
-
July 14th, 2008, 03:21 PM
#3
Re: NotifyIcon Bug?
as I thought, this isn't a bug - by default, a form cannot actually minimise to the system tray (although I suspect the gurus can tell us hundreds of ways to make it so...). The solution I use is:
Code:
Private Sub cmdMinimise_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdMinimise.Click
Me.WindowState = FormWindowState.Minimized
Me.Visible = False
End Sub
Private Sub mnuRestore_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuRestore.Click
Me.Visible = True
Me.WindowState = FormWindowState.Normal
End Sub
Don't make the silly mistake with resize code I did when testing this: Always good to catch the fact the form will be too small to give everything a positive height with:
Code:
If Me.WindowState = FormWindowState.Minimized Then Exit Sub
Hope this is a) accurate (I'm looking to you, gurus ) and b) helpful!
Help from me is always guaranteed!*
VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.
*Guarantee may not be honoured.
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
|