H
HotIndigo
Guest
I have designed a CLI window and need to define a MouseLeave event on a picturebox (pic_Box). In MyForm.h I have:
this->pic_Box->MouseLeave += gcnew System::Windows::Forms::MouseEventHandler(this, &MyForm:ic_Box_MouseLeave);
private: System::Void pic_Box_MouseLeave(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
// Some Code.
}
The code line this->pic_Box->MouseLeave gives me an error "squiggle" under += , stating:
Error E1767 function "System::Windows::Forms::Control::MouseLeave::add" cannot be called with the given argument list
argument types are: (System::Windows::Forms::MouseEventHandler ^)
object type is: System::Windows::Forms::Control ^
I have searched the Net and other help sites but I have not been able to find any way of solving this error. The object browser suggests using System::Windows::Forms:ataGridViewCellMouseEventArgs^ e) in the event handler but this hasn't helped either. Any pointers would be most welcome.
Continue reading...
this->pic_Box->MouseLeave += gcnew System::Windows::Forms::MouseEventHandler(this, &MyForm:ic_Box_MouseLeave);
private: System::Void pic_Box_MouseLeave(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
// Some Code.
}
The code line this->pic_Box->MouseLeave gives me an error "squiggle" under += , stating:
Error E1767 function "System::Windows::Forms::Control::MouseLeave::add" cannot be called with the given argument list
argument types are: (System::Windows::Forms::MouseEventHandler ^)
object type is: System::Windows::Forms::Control ^
I have searched the Net and other help sites but I have not been able to find any way of solving this error. The object browser suggests using System::Windows::Forms:ataGridViewCellMouseEventArgs^ e) in the event handler but this hasn't helped either. Any pointers would be most welcome.
Continue reading...