求乙個思路和乙個定義的方法

2021-07-07 07:36:52 字數 1324 閱讀 7548

程式**:

&&百錢買百雞.prg

&&_screen.visible= .f.

formheight=280

formwidth=375

objform=createobject("fm1")

objform.show

read events

define class fm1 as form

windowtype=1

showwindow=2

desktop=.t.

autocenter=.t.

caption="百錢買百雞(舉解法)"

height=formheight

width=formwidth

add object cmdexit as mycmd1 with top=formheight-5-25,left=formwidth-5-85

add object pageframe1 as mypf with top=5,left=5

&&add object page1 as mypage1

&&add object page2 as mypage2

procedure unload

clear events

endproc

&&procedure ??調整視窗大小

&&思路

&&endproc

enddefine

define class mypf as pageframe

visible=.t.

pagecount=2

height=formheight-10-25

width=formwidth-5

enddefine

*!* define class mypage1 as page

*!* &&

*!* enddefine

*!* define class mypage2 as page

*!* &&

*!* enddefine

define class mycmd1 as commandbutton

visible=.t.

caption="退出"

height=25

width=85

procedure click

thisform.release

endproc

enddefine

問題一:視窗大小調整了,頁框的大小怎麼隨之重新整理?求思路

問題二:page控制項是怎麼add object的?

python定義乙個 Python定義乙個類

在物件導向的世界裡,你的 通常稱為 類的方法 method,而資料通常稱為 類的屬性 attribute,例項化的資料物件通常稱為 例項 instance。python使用class建立類。每個定義的類都有乙個特殊的方法,名為 init 可以通過這個方法控制如何初始化物件。類中方法的定義與函式的定義...

乙個保密思路

如果你機子被入侵,那麼你最擔心的是什麼?那麼怎麼保護自己呢?這個時候乞求防毒軟體 防火牆,恐怕早沒什麼效果。基於上面的擔心考慮,我想出乙個不是萬能的辦法 1 寫乙個程式,感染本機內除系統目錄外的全部檔案,或者感染你指定的機密檔案。2 程式會自動的在所有源 檔案中插入特定 函式。3 本級每次啟動建立多...

php宣告乙個方法,php如何定義乙個函式

函式是完成乙個特定功能的 集合,可以分為系統函式和使用者函式。使用者可以通過建立自定義函式實現特定需要。1.函式定義語法結構 php中允許使用者使用function關鍵字建立乙個自定義函式。語法結構 function 函式名稱 引數1,引數2,函式內的 php對函式名稱的限制比較少,可以是以字母或下...