Getox Posted November 27, 2004 Posted November 27, 2004 (edited) when close button is pressed, stop program from ending? how do i do that with the tray icon still showing? Edited November 27, 2004 by Getox Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
coldfusion244 Posted November 27, 2004 Posted November 27, 2004 when close button is pressed, stop program from ending? how do i do that with the tray icon still showing? Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True End Sub Using the Cancel = true, stops the program from ending, after that you want to add any code for the systemtray icon. I believe you'll want to look at NotifyIcon class. -Sean Quote -Sean
Winston Posted December 1, 2004 Posted December 1, 2004 Just a note, remember that adding e.Cancel = true, although prevents the application from being closed, remember you to take into account when you application is running and a user shuts down their computer, because this will halt the shutdown process. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.