Re: One Close statement closes both forms??
Stuart Laughlin <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
On 5/23/07, Steve Abaffy <[email protected]> wrote: > > The This.Close command closes the ShowDupRecordForm and Form2 shouldn't it > only close ShowDupRecordForm? And if not how does one do this? > You have a main form which shows a second form (via ShowDialog()) which in turn shows a third form (also via ShowDialog()). In response to some event raised and handled by the third form, the third form closes itself (via this.Close()). If that is your scenario, then yes, only the third form should close (i.e. ShowDupRecordForm in your example). I have verified this in VS2005. If you are seeing other behavior then something else must be in the mix. --Stuart