I have a HeaderFile Common_Datas.h
//Common_Datas.h
public ref class MyDBDatas
{
//blah...blah...blah...
public: static System::Void Material_Name( System::Object^ Sender, System::Windows::Forms::KeyEventArgs^ e) {
//blah...blah...blah...
}
public: static System::Void Supplier_Name( System::Object^ Sender, System::Windows::Forms::KeyEventArgs^ e) {
//blah...blah...blah...
}
};
And now from my Form2 – textBox2 I would like to declare
textBox2->KeyDown += gcnew KeyEventHandler(MyDBDatas, &MyDBDatas::Supplier_Name);
- Iam not getting the above line……..
-
Also I would like to learn same statement, how to use in “delegate” statemen?
Thanks…
The first parameter in the delegate constructor is the object, not the type, that the delegate should be called on. Try this in the MyDBDatas constructor: