Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form doesnt respond to QueryUnload

Status
Not open for further replies.

Jaroslaw

Programmer
Oct 15, 2002
10
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top