Re: One Close statement closes both forms??
samir parekh <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Hi, sorry to interrupt, but shouldnt the modal dialogs be closed using the dialogResult property use the DIalogResult property of the secont dialog form which you are opening from within the fist dialog. just assigning the dialogresult property of the third form will close it... Regards samir Stuart Laughlin <[email protected]> wrote: On 5/23/07, Steve Abaffy 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 --------------------------------- Need a vacation? Get great deals to amazing places on Yahoo! Travel.