このコードを使用して、メッセージボックスの特定の回答のフォームを閉じようとしています。に属していYes
ないというエラーが表示され続けます。私は基本的にこのコードをMSサイトから直接コピーしたので、何が問題なのかわかりません。ヘルプ?No
DialogResult::
private: System::Void Form1_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
if(!watchdog->Checked)
{
if((MessageBox::Show("CAN Watchdog is currently OFF. If you exit with these settings, the SENSOWheel will still be engaged. To prevent this, please enable CAN Watchdog before closing. Would you still like to quit?", "Watchdog Warning", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == DialogResult::No))
{
return;
}
else
{
close_Click(this, e);
}
}
}