Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

Using of Form.ShowDialog Method - 03.11.2009

We use Form's ShowDialog method in various parts of applications we develop. However these forms will not be collected by GarbageCollector since they are not manually disposed.

Here are the lines from msdn documentation.

When a form is displayed as a modal dialog box, clicking the Close button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the DialogResult property to be set to DialogResult.Cancel. Unlike modeless forms, the Close method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the DialogResult property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is not closed, you must call the Dispose method of the form when the form is no longer needed by your application.

http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx

Codes

Add Comment
First Name Last Name
Web Site
E-Mail
Comment




Photos

Los Angeles 25
Show All
Me in MSDN Forums
Entries
News
Articles