|
-
May 3rd, 2006, 04:45 PM
#1
[02/03] Other way to Close Form
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
-
May 3rd, 2006, 04:47 PM
#2
Lively Member
Re: [02/03] Other way to Close Form
works in 2005 also
-
May 3rd, 2006, 05:02 PM
#3
Re: [02/03] Other way to Close Form
 Originally Posted by [anarchy]
works in 2005 also 
Thanks for your reply.
I was just testing it in the VB 2005 Express Edition and it's working to, like you said.
sparrow1
-
May 3rd, 2006, 06:08 PM
#4
Re: [02/03] Other way to Close Form
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!
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.
If your application has any forms open, you should close them before executing End.
As you see, End is not a way to "close" forms.
-
May 9th, 2006, 05:39 AM
#5
Re: [02/03] Other way to Close Form
 Originally Posted by jmcilhinney
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!As you see, End is not a way to "close" forms.
Hi jm,
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
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
|