上面已經(jīng)講解的窗口設(shè)計的基本過程與步驟,那么下面我們根據(jù)我們的需要自行設(shè)計一下窗口。
我的目的主要是進(jìn)行,瀏覽窗口,統(tǒng)計窗口與信息窗口的練習(xí)(其他那幾項(xiàng)很簡單一看就會這里就不進(jìn)行練習(xí)了)
1.我這里有一個CELL的表,我想建立三個菜單項(xiàng),分別為瀏覽窗口,統(tǒng)計窗口與信息窗口,然后各自實(shí)現(xiàn)自己的功能。
sub main
alter menu bar add
"窗口設(shè)計練習(xí)"
create menu "窗口設(shè)計練習(xí)" as
"瀏覽窗口" Calling browse_table,
"統(tǒng)計窗口" Calling graph_table,
"定制信息窗口" Calling info_table
end sub
如圖:
[attach]214635[/attach]
2.瀏覽窗口,我想要瀏覽CELL表的 全部內(nèi)容
Sub browse_table
Browse * From cell
end sub
最終效果如圖:
[attach]214636[/attach]
3.統(tǒng)計窗口,我想對BCCH的分布進(jìn)行統(tǒng)計輸出,也就是我們平時所說BCCH頻點(diǎn)的利用情況,可以看出那些頻點(diǎn)的使用次數(shù)多,也就是復(fù)用程度高。
Sub graph_table
Select
BCCH, Count(*) "cnt"
From cell
Into bcch_count
GROUP BY BCCH
Order By BCCH
GraphBCCH,cntFrom bcch_count
end sub
最終效果如圖:
[attach]214637[/attach]
Y軸為頻點(diǎn),X軸為出現(xiàn)次數(shù)。
4.信息窗口,我想顯示 cell表 第一行的 bsc,ci,bcch 情況。
Sub info_table
Select
bsc,ci,BCCH
From cell
Into cell_Query
SetWindow Info
Title"Contry Data"
Font MakeFont("Arial", 1,10, BLACK, WHITE)
Width 3 units "in" Height 1.2 units "in"
Position (2.5, 1.5) units"in"
Front
Table cell_Query Rec 1
end sub
最終效果如圖:
[attach]214638[/attach]
本次的全套源代碼見附件:
窗口.zip (583 Bytes)
[
本帖最后由 hillyspring 于 2012-1-10 23:04 編輯 ]