Hi all,
I'm working on a small application that runs as a Windows 2000 service (I am using ntsvc.ocx).
I am creating an icon in the system tray when the service is started. When the user clicks it, a form shows. To hide the form I have put the following code in the QueryUnload event:
If UnloadMode = vbFormControlMenu Then
Me.Hide
Cancel = True
End If
Everything works fine until I log out and log back in. When I do this, my form stops responding to the QueryUnload event. That is, when I click the systray icon and the form shows up, after pressing the "X" button nothing happens.
Thanks for any comments or suggestions,
Jaroslaw
I'm working on a small application that runs as a Windows 2000 service (I am using ntsvc.ocx).
I am creating an icon in the system tray when the service is started. When the user clicks it, a form shows. To hide the form I have put the following code in the QueryUnload event:
If UnloadMode = vbFormControlMenu Then
Me.Hide
Cancel = True
End If
Everything works fine until I log out and log back in. When I do this, my form stops responding to the QueryUnload event. That is, when I click the systray icon and the form shows up, after pressing the "X" button nothing happens.
Thanks for any comments or suggestions,
Jaroslaw