. Formalar o’rtasidagi chaqiruv
if
(dr == System::Windows::Forms::
DialogResult
::
OK
)
return
;
else
{
MessageBox
::Show(
"MyForm2 ni yopishda xatolik!"
);
goto
m;
}
}
private
: System::Void button2_Click(System::
Object
^
sender
, System::
Eve
ntArgs
^
e
) {
//MyForm2 ga chaqiruv
MyForm2 ^f3 =
gcnew
MyForm2();
f3->Show();
}
private
: System::Void button3_Click(System::
Object
^
sender
, System::
Eve
ntArgs
^
e
) {
this
->Close();
}
//
MyForm1 faylida
private
: System::Void button1_Click(System::
Object
^
sender
, System::
Eve
ntArgs
^
e
) {
this
-
>DialogResult = System::Windows::Forms::
DialogResult
::
OK
;
this
->Close();
//MyForm1 ni yopish
}
//
MyForm2 faylida
private
: System::Void button1_Click(System::
Object
^
sender
, System::
Eve
ntArgs
^
e
) {
this
->Close();
}
Do'stlaringiz bilan baham: |