Hi guys,
I am using RightToLeft::Yes and RightToLeftLayout properties to set the form from left to the right. My problem is that I couldn't be able to find the solution how to close the form when I am using the code to block the form from being execute while using RightToLeft::Yes and RightToLeftLayout properties, without using the block code it will be execute every time when I am trying to opening the form.
I tried to use this:
Code:
private: System::Void Form2_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
if(!OkToClose)
{
e->Cancel = true;
}
}
The form will be execute when I opening the form every time, so I am now using the current code which I am using this right now:
Code:
private: System::Void Form2_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
if(OkToClose)
{
e->Cancel = true;
}
}
Now, I am trying to close the form, but I can't be able to do because I am using the block code to avoid the form from being execute when I opening them. I can't find a way to close the form. Do you know how to close the form after I have block them from being execute when I am still using RightToLeft::Yes and RightToLeftLayout properties?
Thanks,
Mark