  | 
				VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.   
				 | 
			 
		 
		 
	
		| 上一篇主題 :: 下一篇主題   | 
	 
	
	
		| 發表人 | 
		內容 | 
	 
	
		wsk
 
 
  註冊時間: 2004-01-14 文章: 51
 
  第 1 樓
  | 
		
			
				 發表於: 星期二 三月 23, 2004 9:33 pm    文章主題: 兩個關於表單的問題, 請高手指點 | 
				     | 
			 
			
				
  | 
			 
			
				1. 怎樣可以知道一個表單(form)是已啟動或已釋放(release)
 
2. 一個表單集(formset)有兩個表單, A及B, 我先開啟A, 後再開啟B, 然後釋放B表單, 請問怎樣才可再次啟動 B 表單?
 
 
      | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		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 | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
  	 
	    
  	   | 
 	
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
  | 
   
  
		 |