線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:4487
推到 Plurk!
推到 Facebook!

ModalResult = mrok 與 = mrabort 有何分別?

答題得分者是:Stallion
MatthewSong
一般會員


發表:17
回覆:17
積分:6
註冊:2007-09-24

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-12-03 11:11:41 IP:202.175.xxx.xxx 訂閱
我主要是從第二個form跳出到第一個form,

我發現modalresutl 幾個value都可以跳出
我想問有何分別,

會不會因為不同的值,會做成不同的效果,與譯放空間等東西,謝謝
編輯記錄
taishyang 重新編輯於 2007-12-03 17:59:18, 註解 無‧
Stallion
版主


發表:52
回覆:1600
積分:1995
註冊:2004-09-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-12-03 15:43:50 IP:75.41.xxx.xxx 未訂閱
ModalResult的傳回值是提供給呼叫它的FORM讀取使用的,以便瞭解離開該FORM時使用者或者是程式設計者設定的狀態如此而已。
這些Online Help 應該都有說明吧。
===================引 用 MatthewSong 文 章===================
我主要是從第二個form跳出到第一個form,我發現modalresutl 幾個value都可以跳出我想問有何分別,會不會因為不同的值,會做成不同的效果,與譯放空間等東西,謝謝
MatthewSong
一般會員


發表:17
回覆:17
積分:6
註冊:2007-09-24

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-12-03 16:53:29 IP:202.175.xxx.xxx 訂閱
就只有這些

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

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-12-03 23:31:41 IP:75.41.xxx.xxx 未訂閱
那就對啦~
接收這些可能候選的傳回值,作為後續程式寫作流程的判斷。
===================引 用 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

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-12-04 01:59:38 IP:202.175.xxx.xxx 訂閱
 

我就是想知,如果不同的傳回值,對當然的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

發送簡訊給我
#6 引用回覆 回覆 發表時間:2007-12-04 15:12:20 IP:75.41.xxx.xxx 未訂閱
那你的問題不在這裡~
你應該把問題導向在研究視窗(OBJECT)的建立(Create)與消滅(Destroy)上面,由於VCL包裝了視窗物件,所以剛學習以及涉入不深的人往往不得而知。從遠處看,你可以從研究視窗的訊息與VCL如何包裝視窗訊息開始,從近處看,你可以先行瞭解VCL(Delphi)提供了何種方法,來重載讓USER可以自行控制物件的建立與消滅,或者是提供了一些更簡便的屬性方法來控制一些常用的狀態與事件,例如 On Close裡面不是有一個 Action 屬於TCloseAction型別屬性嗎?查一下Online Help 會有答案。
系統時間:2024-04-19 14:17:28
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!