I think I managed to do the first method, thanks a lot.
however, I'm missing something in the other one...
how do I subscribe to main form?
Main Topics
Browse All TopicsI'm using an interface to get events from an assemblyform to the mainform for execusion. now I need the assemblyform to get events from the mainform? how to do it?
thanks in advance
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You create a class which inherits from EventArgs and add in your data to an instance of that - unless there is an existing class which meets your needs of course.
I showed you this article before:
http://www.audacs.c
W
ok.. no, I'm not sure why, but there's something very wrong with my code... and I'm starting to get confused
to be able to send data I need to create a class that will be used as the eventargs and that will contain data...
I'm not able to use the new created eventargs in the event I'm sending to the assemblyform because there's a conflict in conversion between the newly created eventargs and the system.eventargs..
...
Business Accounts
Answer for Membership
by: daveamourPosted on 2009-06-25 at 05:05:41ID: 24710448
Hello again
You can do one of two things
Have an event handler in your main form which executes some code when a main form event happens - this code will then ececute some method or other on the other form - eg myOtherForm.SomeMethod()
Al ternativel ey you can get the assembly form to subscribe to the main form's event.
MainForm.MyEvent += new EventHandler(myOtherForm.S omeMethod) ;