Article View: borland.public.cppbuilder.nativeapi
Article #16435strange behavior of input dialog box - mrOk
From: JeJe
Date: Tue, 13 May 2003 05:22
Date: Tue, 13 May 2003 05:22
39 lines
2197 bytes
2197 bytes
Hi, I am using BCB4, I have a form (frmInsert) that has a button 'Insert', on clicking on it, I bring up a new input dialog box: inputDialogBox d = new frmInputDialogBox(); nResult = d.ShowModal(); .. delte d; ------------- in the frmInputDialogBox form, there are two buttons, OK (mrOk), and Cancel (mrCancel), apparently I am doing a this->Close() on both events of the buttons. I override the Close() method of the form. at the end of the method, I have frmInputdialogBox = NULL; ------------- the strange thing is, I don't think this should work, after calling this->Close() on clicking the OK button, the ModalResult will be reset to 2 (mrCancel) instead of the original value (mrOk), so on the frmInsert, the nResult will always be 2. however, this is what I had about a year ago, and apparently it worked fine (returning 1 when OK is clicked), and then I deliver a few versions in between, but had not change anything in these two forms or project properties, now it is strangely not working (returning 2 when OK is clicked).. I even recompiled with this one year old version, and still now working (returning 2 when OK is clicked), what went wrong? why was it working before? no DLL's got changed.. should I delete vcl40.csm, and rebuild the whole project? please help.. with any suggestions! thanks, JeJe
Technical Details
Message-ID:
<3ec08128$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f62c21c9818eccf7,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-12 22:27:48 PST From: "JeJe" <jejesan@hotmail.com> Sender: "JeJe" <jejesan@hotmail.com> Reply-To: "JeJe" <jejesan@hotmail.com> Subject: strange behavior of input dialog box - mrOk Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 67.30.103.243 67.30.103.243 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ec08128$1@newsgroups.borland.com> Date: 12 May 2003 22:22:48 -0700 X-Trace: newsgroups.borland.com 1052803368 207.105.83.65 (12 May 2003 22:22:48 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail