CancelEventArgs

G

Guest

HI, I want to do an application that when the user clicks on the Close button, it cancel the closing operation and them it activates a timer to hide it.

Private Sub frmMain_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True
tmrOut.Enabled = True
End Sub


BUt it has a problem, when I try to Shutdown Windows XP, it does not shutdows, if I close the aplicatton it shutdows normally.

What should I do???

Thanks anyway
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?bHR0MTk=?= said:
BUt it has a problem, when I try to Shutdown Windows XP, it does not
shutdows, if I close the aplicatton it shutdows normally.

Have a look at 'SystemEvents.SessionEnding' and/or
'SystemEvents.SessionEnded'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top