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
Carol Markham
NA
1
2.9k
Converting from C# to VB problem
Nov 17 2010 8:34 AM
Hi,
I am converting a mobile app from C# to VB. My problem is with clicking on a menuItem.
The original C# code for the _Click is as follows:
private void mnuItmQuit_Click(object sender, EventArgs e)
{
Application.Exit();
}
Which I have converted as this:
Private
Sub
mnuItmQuit_Click(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
Application.[Exit]()
End
Sub
Further down the generated Forms code for mnuItmQuit is:
Me
.mnuItmQuit.Text =
"Quit"
Me
.mnuItmQuit.Click +=
New
System.EventHandler(
AddressOf
Me
.mnuItmQuit_Click)
However, I get this error: "Public Event Click(sender As Object, e As System.EventArgs" is an event and cannot be called directly. Use a RaiseEvent statement to raise an event.
At this point, I'm lost and have no idea where or how to do the RaiseEvent.
Thanks in advance.
Reply
Answers (
2
)
Access One User Control From Another User Control
Simple Form Problem(hopefully)