VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

兩個關於表單的問題, 請高手指點

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
wsk



註冊時間: 2004-01-14
文章: 51


第 1 樓

發表發表於: 星期二 三月 23, 2004 9:33 pm    文章主題: 兩個關於表單的問題, 請高手指點 引言回覆

1. 怎樣可以知道一個表單(form)是已啟動或已釋放(release)
2. 一個表單集(formset)有兩個表單, A及B, 我先開啟A, 後再開啟B, 然後釋放B表單, 請問怎樣才可再次啟動 B 表單?

Embarassed Sad
回頂端
檢視會員個人資料 發送私人訊息
Ruey



註冊時間: 2003-03-12
文章: 1698
來自: tunglo

第 2 樓

發表發表於: 星期三 三月 24, 2004 11:59 am    文章主題: 引言回覆

1.看這兩各是否對你有幫助

_SCREEN.formcount
_SCREEN.forms

或者用陣列方式(程式來自VFP)
代碼:
#define INSTANCE_LOC "Instance "
LOCAL nFormLeft, nFormTop, cFormCaption
nInstance = ALEN(THISFORM.aForms)


*Set the Top and Left Properties to Cascade the new Forms
IF nInstance > 1 AND TYPE('THISFORM.aForms[nInstance -1]') = 'O' ;
      AND NOT ISNULL(THISFORM.aForms[nInstance -1])
   nFormTop = THISFORM.aForms[nInstance -1].Top + 20
   nFormLeft = THISFORM.aForms[nInstance -1].Left + 10
ELSE
   nFormTop = 1
   nFormLeft = 1
ENDIF

*Set the caption to reflect the instance number
cFormCaption = INSTANCE_LOC + ALLTRIM(STR(nInstance))


* Run the form and assign the object variable to the array element
* The Linked keyword indicates that all instances will be released when
* the array is released. Without 'LINKED', the multiple instance forms
* would persist after the array is released
DO FORM Multi NAME THISFORM.aForms[nInstance] WITH ;
     nFormTop, nFormLeft, cFormCaption LINKED

*Redimension the array so that more instances of the form can be launched      
DIMENSION THISFORM.aforms[nInstance + 1]


2.可以使用Show/Hide

_________________
#############################
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!

學會VFP使用者社區的搜尋,Code才會更有趣~
#############################
回頂端
檢視會員個人資料 發送私人訊息
wsk



註冊時間: 2004-01-14
文章: 51


第 3 樓

發表發表於: 星期五 三月 26, 2004 1:01 am    文章主題: 引言回覆

Ruey 寫到:
1.看這兩各是否對你有幫助

_SCREEN.formcount
_SCREEN.forms

或者用陣列方式(程式來自VFP)
代碼:
#define INSTANCE_LOC "Instance "
LOCAL nFormLeft, nFormTop, cFormCaption
nInstance = ALEN(THISFORM.aForms)


*Set the Top and Left Properties to Cascade the new Forms
IF nInstance > 1 AND TYPE('THISFORM.aForms[nInstance -1]') = 'O' ;
      AND NOT ISNULL(THISFORM.aForms[nInstance -1])
   nFormTop = THISFORM.aForms[nInstance -1].Top + 20
   nFormLeft = THISFORM.aForms[nInstance -1].Left + 10
ELSE
   nFormTop = 1
   nFormLeft = 1
ENDIF

*Set the caption to reflect the instance number
cFormCaption = INSTANCE_LOC + ALLTRIM(STR(nInstance))


* Run the form and assign the object variable to the array element
* The Linked keyword indicates that all instances will be released when
* the array is released. Without 'LINKED', the multiple instance forms
* would persist after the array is released
DO FORM Multi NAME THISFORM.aForms[nInstance] WITH ;
     nFormTop, nFormLeft, cFormCaption LINKED

*Redimension the array so that more instances of the form can be launched      
DIMENSION THISFORM.aforms[nInstance + 1]


2.可以使用Show/Hide
謝謝 RUEY
回頂端
檢視會員個人資料 發送私人訊息
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作