Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Select Case UnloadMode
Case vbFormControlMenu
form.hide
Cancel = 1
Case vbFormCode
Call module.del_tray
Case vbAppWindows
Call module.del_tray
Case vbAppTaskManager
Call module.del_tray
End Select
End Sub
this will do the trick .. if u unload the form with the [x] then it will hide the form and cancel the unload request .. all other will delete the icon from tray ..
Hiding the form will still remove the icon from the taskbar. If you want the icon to remain on the taskbar you need to programatically minimize the form. So in place of the form.hide in dgtarts code put:
humm .. i thought he ment a taskbar icon like icq or winamp(NotifyIcon). And that he wanted a function like msn-exp or sql server maneger. .. What kind of icon du u meen?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.