|
-
Jan 20th, 2004, 05:41 AM
#1
Thread Starter
Lively Member
Help!! Notify icon Problem
Hi,
I have a notify icon in my system tray and all works well but when i go to shutdown my machine it does nothing.
When I close down the program from the system tray then shutdown its shuts down as normal.
is there any bit of code i could use to close the program when windows shut's down.
i'm using this code but it doesn't seem to work.
Private Sub FaultReport_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If frmclose = True Then
Else
If Microsoft.Win32.SessionEndReasons.SystemShutdown = True Then
Me.Close()
Else
Me.Hide()
e.Cancel = True
End If
End If
End Sub
Private Sub MnuClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MnuClose.Click
frmclose = True
Me.Close()
End Sub
-
Jan 20th, 2004, 06:57 AM
#2
Sleep mode
Try this to exit the application .
-
Jan 20th, 2004, 07:11 AM
#3
Thread Starter
Lively Member
have tried replacing me.close with application.exit
but doesn't seem to work.
any other ideas???
-
Jan 20th, 2004, 07:35 AM
#4
Sleep mode
What do you want to do exactly ?
-
Jan 22nd, 2004, 06:35 AM
#5
Thread Starter
Lively Member
when this program is exited rather than closing it hides and and notify icon apears in the system tray rather like msn messenger. to close it properly u right click the click the icon and select close.
but if you try and shutdown/log out of windows it does nothing cuz in some way the program stops the shutdown/lof off comand. when you close the program fully it shuts down fine. what i want it to do is when the system is shutting down for it to close automatically but it wont? any ideas?
-
Jan 22nd, 2004, 06:49 AM
#6
Member
Well this has nothing to do with the notify icon, but...
is exactly the problem i had and posted on here the other day...
http://www.vbforums.com/showthread.p...33#post1606833
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
|