|
-
Nov 17th, 2009, 07:31 AM
#1
Thread Starter
Member
how to end the process when i close my window
hi
i am using a server that remain working when i close the window
Please , how to stop the process
Thank you
-
Nov 17th, 2009, 07:50 AM
#2
Re: how to end the process when i close my window
There are really only two reasons that your process wouldn't exit:
1. You have hidden a form instead of closing it.
2. You have a second foreground thread running.
Which is it in your case?
-
Nov 17th, 2009, 08:26 AM
#3
Thread Starter
Member
Re: how to end the process when i close my window
No i press the X button , but the process keeps working
maybe because i have a server / client form
is there a property for the form to close it with the process
i thought about making a button that contain Me.close , but this is not working !
-
Nov 17th, 2009, 10:52 AM
#4
Hyperactive Member
Re: how to end the process when i close my window
vb Code:
Public Class Form1
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Form1.Close()
Form2.Close()
Form3.Close()
Form4.Close()
'Your other forms.'
End Sub
End Class
-
Nov 17th, 2009, 06:18 PM
#5
Re: how to end the process when i close my window
 Originally Posted by saadmechiche
No i press the X button , but the process keeps working
maybe because i have a server / client form
is there a property for the form to close it with the process
i thought about making a button that contain Me.close , but this is not working !
As I've explained, there are really only two reasons that your app wouldn't be closing. There is no property that is stopping it closing that you can change to fix it. The problem is that you either have hidden a form instead of closing it or else you have another foreground thread running.
What is the shutdown mode of your app set to in the project properties and exactly what forms do you use and how? Do you maybe have a login form as your startup form that you then hide instead of closing to stop the app shutting down straight away? Something like that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|