The following will describe in details
I have a class
//MyDataHeaders.h
public ref class MyGlobalData {
//blah...blah...blah...
public: static System::Void Pty_NameCell( System::Object^ Sender, System::Windows::Forms::KeyEventArgs^ e) {
//blah..blah...
}
};
And in Form2 I have a Sub…like the following..
//Form2.h
public: static System::Void MySupplier_LstVew() {
//blah..blah..
}
Form2_load() {
textBox2->KeyDown += gcnew KeyEventHandler(MyGlobalData::Pty_NameCell); //OK
};
But Here I want to use
textBox2->KeyDown +=delegate { gcnew KeyEventHandler(MyGlobalData::Pty_NameCell); MySupplier_LstVew(); };
How to declare the textBox2-> Keydwon event with (MyGlobalData::Pty_NameCell),MySupplier_LstVew() together?
Is it possible?
Thanks
yes, you can do