Hi All,
I found another way to close Form with several buttons.
Here's the Code:
VB Code:
Private Sub CloseForm(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCancel.Click, cmdOK.Click End End Sub
Could be helpfull.
Wkr,
sparrow1
Printable View
Hi All,
I found another way to close Form with several buttons.
Here's the Code:
VB Code:
Private Sub CloseForm(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCancel.Click, cmdOK.Click End End Sub
Could be helpfull.
Wkr,
sparrow1
works in 2005 also :)
Thanks for your reply.Quote:
Originally Posted by [anarchy]
I was just testing it in the VB 2005 Express Edition and it's working to, like you said. :thumb:
sparrow1
Gadzooks! Have you read the help topic for the End statement? It's pretty much akin to using End Process in the Task Manager. Bad, bad, bad!Quote:
Note The End statement stops code execution abruptly, without invoking the Finalize method or any other Visual Basic code. Object references held by other programs are invalidated.
As you see, End is not a way to "close" forms.Quote:
If your application has any forms open, you should close them before executing End.
Hi jm,Quote:
Originally Posted by jmcilhinney
Yes I've readed the topic for the End statement and I've searched this forum but, I've readed MCAD/MCSD also and there I found this other solution.
I quote:
Add code to the procedure to close the application. This is simple the End statement. With the code example written like the one in my first post.
I think you can understand now that I thought (MCAD/MCSD is to get a certified application and solution developer) it was another and GOOD way of closing a Form.
Wkr,
sparrow1