TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Antonio March
NA
3
11.6k
Skip the same code for buttons [RESOLVED]
Sep 17 2010 5:50 AM
I have several Windows Forms in my VB .NET application.
Most of them have a button called btnExit that has this event.
Public Class frmTest
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnExit.Click
Me.Close()
End Sub
End Class
I think this piece of code could removed from all the forms and substitute by a code that reflects the following way of reasoning
btnExit belongs to the Class of clsButtonsExit, and that class always handles the Me.Close () statement when clicked.... But, how is this implemented???
Another question: the underscore in the function declaration can't be removed in Visual Basic 2010 Express, it causes a Debug error. I thought underscores where no longer required in VB 2010 (althought I think it is a good practise to keep them )
thanks
Reply
Answers (
2
)
Lagging .gif picture?
Web or Windows forms [RESOLVED]