I tried to set up a handler in many sub...
---------------------------------------
Public Sub Main
Dim oForm as New Form1
oForm.NotifyIcon.Text = "Test"
oForm.NotifyIcon.Icon = oForm.Icon
oForm.NotifyIcon.Visible = True
AddHandler Microsoft.Win32.SystemEvents.SessionEnding, New
SessionEndingEventHandler(AddressOf SessionIsEnding)
Application.Run()
End Sub
---------------------------------------
I also tried to Set up the Handler in the Form_Load Event...
If I start My Applicatiotion directly with the Form, it works perfectly...
Any Help will be appreciate...
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c7***********@ID-208219.news.uni-berlin.de...
* "Eddie" <ma*************@videotron.ca> scripsit: It works only if I Start My application with a Form.
The problem is that I Start My Application without form... Only with a
NotifyIcon... like this :
Are you sure you set up a handler? Post the code you used to handle the
'SessionEnding' event.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>