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
Edward Munya
NA
20
0
Event Handling between forms in C#
Nov 20 2012 8:40 AM
I am dealing with 2 forms. A child form and a parent form.
I want to enable a textbox on a parent form immediately when a child form closes.
Below are codes and error messages I got. Please any idea would be appreciated.
public class ChildForm: Form
{
public delegate SomeEventHandler(object sender, EventArgs e);
public event SomeEventHandler SomeEvent;
}
The above code is for child form
and again below codes are for parent form:
public class ParentForm : Form
{
frmCaptureFingerPrint child = new frmCaptureFingerPrint();
child.SomeEvent += new EventHandler(this.HandleSomeEvent);
public void HandleSomeEvent(object sender, EventArgs e)
{
this.textBox1.enabled=true;
}
}
Please need your help
I get a error message that:
Cannot implicitly convert type 'System.EventHandler to CaisseSec....SomeEventHandler
Reply
Answers (
5
)
Error while readding xml file docttype element "could not find file path"
How to print forms content like labels in c# window application