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
Kjell Liljegren
NA
6
23.9k
Raising event in another form
Apr 18 2011 2:28 PM
Hi
I'm a bit new to custom events and delegates so I'm having problem to get a good solution to this problem.
I've got an MDI app that can load several forms as child-forms, all with different contents.
It can also show a .showdialog form for input of new data and on exiting this form the MDI form needs to notify one of the loaded Child forms that it's data has been changed and its time to reload the list content.
So, How can I raise an Event in one loaded Child form from the MDI form?
I can use something similar to this function to find out IF the child form is loaded or not.
(I'm using this function to avoid loading the same child form twice)
public static bool ShowThisChildWindow(String WinTagName)
{
foreach (Form childForm in Application.OpenForms)
{
if (childForm.Tag != null)
{
if (childForm.Tag.ToString() == WinTagName.ToString())
{
childForm.BringToFront();
return true;
}
}
}
return false;
}
Best Regards
Kjell
Reply
Answers (
6
)
Transparent buttons, C# -> Windows 7
the role of void and return keyword