16 Ekim 2011 Pazar

How To Use Dialogresult In C Sharp

DialogResult Olay = MessageBox.Show("Bu satır silinecek","Onaylama",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Exclamation);
if (DialogResult.Yes == Olay)
MessageBox.Show("Yes düğmesi tıklandı");
if (DialogResult.No == Olay)
MessageBox.Show("No düğmesi tıklandı");
if (DialogResult.Cancel == Olay)
MessageBox.Show("Cancel düğmesi tıklandı");
DialogResult Onay = MessageBox.Show("düğme tıkla","deneme",MessageBoxButtons.AbortRetryIgnore);
if (DialogResult.Abort == Onay)
MessageBox.Show("Abort düğmesi tıklandı");
if (DialogResult.Ignore == Onay)
MessageBox.Show("Ignore tuşu tıklandı");
if (DialogResult.Retry == Onay)
MessageBox.Show("Retry düğmesi tıklandı");

0 yorum:

Yorum Gönder