|
-
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
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
|