Drags111

Hello, I am making a special calculator for Algebra, and one problem i notice, is when I close the program windows, the process keeps running. How can I fix this for people to be able to use the X button and close the process Thank you in advanced.


Re: Visual Basic Express Edition Process Keeps Running...

=Steve D=

In Project / Properties, is "Shutdown mode" set to "When startup form closes"





Re: Visual Basic Express Edition Process Keeps Running...

Drags111

Yes, that is what it is set to.




Re: Visual Basic Express Edition Process Keeps Running...

ReneeC

do you have any form closed or closing events




Re: Visual Basic Express Edition Process Keeps Running...

Drags111

Hmm, no how would i do that




Re: Visual Basic Express Edition Process Keeps Running...

ReneeC

the point is, code in them, can cancel closing. Do you have any resources or files open




Re: Visual Basic Express Edition Process Keeps Running...

Drags111

No, I dont.




Re: Visual Basic Express Edition Process Keeps Running...

Nate879

Can we see your code





Re: Visual Basic Express Edition Process Keeps Running...

Drags111

Heres my project: http://www.mediafire.com/ 9jthjbh9a3n

(Yes, its called Algebra sucks XD)




Re: Visual Basic Express Edition Process Keeps Running...

Martin Xie - MSFT

Hi Drags,

I have downloaded and viewed your source project.

Here are two corrections:

1. Change Shutdown mode to "When last form closes" in Project Properties.

2. Change Me.Hide to Me.Close in your main form code.

Code Block

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Selection.Show()

Me.Close() 'Change Me.Hide to Me.Close

End Sub

End Class

Likewise, when you close a form and open another form, please remember to use Me.Close.

Then the process will disappear when you close your application.

Regards,

Martin