Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

[vb.net] Problem Closing Form


  • Please log in to reply
No replies to this topic

#1 yano

yano

    I can see what you post!


  • Members
  • 6,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:30 PM

Posted 10 April 2006 - 09:22 PM

Ok I got an application where the initial form is a list box where you select the form you want and then you click a button and it hides the main form and then displays the form you selected.

Ok, then on the second form, I have a back button with this code:

Dim GeoF As New GeometryForm
		GeoF.Show()
		Me.Close()

Where the GeometryForm is the main form.


Ok all of the above works.


However, when I get back to the main form and click "Exit" it closes the program however it is still in the memroy and even Visual Studio says it isn't done debuggin.

I've tried both of the following for the exit button on the main form.

Private Sub BackButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackButton.Click
		  Me.Dispose()
End Sub

Private Sub BackButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackButton.Click
		  Me.Close()
End Sub

I've also tried changing the "Private" to Public for the exit button, but that didn't change anything at all. (or affect anything at all)

Any ideas would be greatly appreciated... I want it to really close

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users