Form X icon

  • Thread starter Thread starter David
  • Start date Start date
D

David

I show my dialog form with ShowDialog() method, How can I make my dialog
form to show X icon on top right corner?
 
You cannot. The ShowDialog method displays a modal dialog. A modal dialog
cannot be minimized
 
Yes but when user click OK icon form is closed and DialogResult.OK is
returned, but I wnat to control when user click OK and make some data
verifications.
How can I do it?
 
David said:
Yes but when user click OK icon form is closed and DialogResult.OK is
returned, but I wnat to control when user click OK and make some data
verifications.
How can I do it?

Handling the Click event of the OK button would be a pretty good approach.

Best Regards,

Andy
 
The ok button at the top right corner of the form does not have a click event associated with it (you cannot access it directly from your code) which is why you need to do any processing u have in the closing and closed events for that form.

Ali Gardezi
 
Ali said:
The ok button at the top right corner of the form does not have a click
event associated with it (you cannot access it directly from your code)
which is why you need to do any processing u have in the closing and closed
events for that form.
Ali Gardezi

I had this silly notion in my head that there was a bona fide OK button on
your form. Seems I made it all up. Doh!

Best Regards,

Andy

".NET or .DIE"
 
Back
Top