Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 forms, in the sub form is a button, when it is clicked some
code on the main form has to be executed.

I tried it with:

MIDL
rowpopup^ popup = gcnew rowpopup();
popup->button_savetoform->Click += gcnew EventHandler(this, &Main::add_new_item);


It will compile, but when I click the button the sub add_new_item is not being entered.
Posted
Updated 12-May-10 22:25pm
v2

1 solution

As you're using managed C++, use delegates to hook up this event before hand, from your main form.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900