المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Working on MessageBoxButtons



C# Programming
01-27-2010, 05:30 AM
Hi my friends. I was working on one of my application in C# and i was using the following code
MessageBox.Show("Are you sure", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

after this line of code it comes a messagebox which says "Are you sure" ... and Yes and No buttons ... but I wanted to know which button was pressed ... .. i.e If the user presses yes ... I want to delete some thing from Database ... If not continue as it is ..... Can any body tell me how to operate on this question.

Thank you