Use QueryUnload

vb6 Kuwait
  • 18 years ago

    Use the queryunload event of the form:

    private sub form_queryunload(Cancel as integer, unloadmode as integer)
       If (unloadmode=vbFormControlMenu) then
           'Cancel the unload of the form
           'Now hide the form and show the icon, if it is not shown yet
           <code for systray icon here>
    end sub

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Better train people and risk they leave – than do nothing and risk they stay.” - Anonymous