ModalResult = mrok 與 = mrabort 有何分別? |
答題得分者是:Stallion
|
MatthewSong
一般會員 ![]() ![]() 發表:17 回覆:17 積分:6 註冊:2007-09-24 發送簡訊給我 |
|
Stallion
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:52 回覆:1600 積分:1995 註冊:2004-09-15 發送簡訊給我 |
ModalResult的傳回值是提供給呼叫它的FORM讀取使用的,以便瞭解離開該FORM時使用者或者是程式設計者設定的狀態如此而已。
這些Online Help 應該都有說明吧。 ===================引 用 MatthewSong 文 章=================== 我主要是從第二個form跳出到第一個form,我發現modalresutl 幾個value都可以跳出我想問有何分別,會不會因為不同的值,會做成不同的效果,與譯放空間等東西,謝謝 |
MatthewSong
一般會員 ![]() ![]() 發表:17 回覆:17 積分:6 註冊:2007-09-24 發送簡訊給我 |
就只有這些
mrNone None. Used as a default value before the user exits. mrOk The user exited with OK button. mrCancel The user exited with the CANCEL button. mrYes The user exited with the YES button. mrNo The user exited with the NO button. mrAbort The user exited with the ABORT button. mrRetry The user exited with the RETRY button. mrIgnore The user exited with the IGNORE button. mrAll The user exited with the ALL button. mrNoToAll The user exited with the NO TO ALL button. mrYesToAll The user exited with the YES TO ALL button. |
Stallion
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:52 回覆:1600 積分:1995 註冊:2004-09-15 發送簡訊給我 |
那就對啦~
接收這些可能候選的傳回值,作為後續程式寫作流程的判斷。 ===================引 用 MatthewSong 文 章=================== 就只有這些 mrNone None. Used as a default value before the user exits. mrOk The user exited with OK button. mrCancel The user exited with the CANCEL button. mrYes The user exited with the YES button. mrNo The user exited with the NO button. mrAbort The user exited with the ABORT button. mrRetry The user exited with the RETRY button. mrIgnore The user exited with the IGNORE button. mrAll The user exited with the ALL button. mrNoToAll The user exited with the NO TO ALL button. mrYesToAll The user exited with the YES TO ALL button. |
MatthewSong
一般會員 ![]() ![]() 發表:17 回覆:17 積分:6 註冊:2007-09-24 發送簡訊給我 |
我就是想知,如果不同的傳回值,對當然的form關了後,本身的object會不會譯放空間等.. ===================引 用 Stallion 文 章=================== 那就對啦~ 接收這些可能候選的傳回值,作為後續程式寫作流程的判斷。 ===================引 用 MatthewSong 文 章=================== 就只有這些 mrNone None. Used as a default value before the user exits. mrOk The user exited with OK button. mrCancel The user exited with the CANCEL button. mrYes The user exited with the YES button. mrNo The user exited with the NO button. mrAbort The user exited with the ABORT button. mrRetry The user exited with the RETRY button. mrIgnore The user exited with the IGNORE button. mrAll The user exited with the ALL button. mrNoToAll The user exited with the NO TO ALL button. mrYesToAll The user exited with the YES TO ALL button. |
Stallion
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:52 回覆:1600 積分:1995 註冊:2004-09-15 發送簡訊給我 |
那你的問題不在這裡~
你應該把問題導向在研究視窗(OBJECT)的建立(Create)與消滅(Destroy)上面,由於VCL包裝了視窗物件,所以剛學習以及涉入不深的人往往不得而知。從遠處看,你可以從研究視窗的訊息與VCL如何包裝視窗訊息開始,從近處看,你可以先行瞭解VCL(Delphi)提供了何種方法,來重載讓USER可以自行控制物件的建立與消滅,或者是提供了一些更簡便的屬性方法來控制一些常用的狀態與事件,例如 On Close裡面不是有一個 Action 屬於TCloseAction型別屬性嗎?查一下Online Help 會有答案。 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |