畫面更新的問題(使用了full screen) |
尚未結案
|
spencerkuo
一般會員 發表:21 回覆:34 積分:11 註冊:2003-08-15 發送簡訊給我 |
請問各位大大
我使用了如下的程式碼去做了full screen的application { Position form }
Top := 0 ;
Left := 0 ; { Go full screen }
BorderStyle := bsNone ;
WindowState := wsmaximized;
ClientWidth := Screen.Width ;
ClientHeight := Screen.Height;
Refresh;
SetForegroundWindow(Handle) ;
SetActiveWindow(Application.Handle) ; 但是我在form create 的時候有做動態的Tbutton
然後放上了timer
在事件上,我有重新free 掉Tbutton, 然後再重新create Tbutton
但是再重新Create Tbutton的時候,full screen就失效了,
window 最下面的bar 就會顯示出來
如何解決呢??
謝謝
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
spencerkuo
一般會員 發表:21 回覆:34 積分:11 註冊:2003-08-15 發送簡訊給我 |
|
spencerkuo
一般會員 發表:21 回覆:34 積分:11 註冊:2003-08-15 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
spencerkuo
一般會員 發表:21 回覆:34 積分:11 註冊:2003-08-15 發送簡訊給我 |
引言: 您在 timer 內的程式碼為何? 小弟試不會這樣. --- 歡迎光臨 KTop 研究院 >>< face="Verdana, Arial, Helvetica"> 先動態的create tpanel, tbutton & tlabel 動態的給元件名稱(4碼) 抓取資料庫的桌號代號 抓資料庫給caption 以tag來作為搜尋區分 每5秒鐘抓取資料庫的桌號代號,尋找未結帳的桌號,對應到動態create的button上的tlabel,show出點單時間 以下只是ttimer的事件source procedure TFm_OBsys.Timer1Timer(Sender: TObject); var i : integer; cdsTemp : TInfoClientDataSet; stablename : string; begin //全螢幕 { Position form } Top := 0 ; Left := 0 ; { Go full screen } BorderStyle := bsNone ; WindowState := wsmaximized; ClientWidth := Screen.Width ; ClientHeight := Screen.Height; Refresh; SetForegroundWindow(Handle) ; SetActiveWindow(Application.Handle) ; for i := 0 to ComponentCount - 1 do if (Components[i] is TTeLabel) then if ((Components[i] as TTeLabel).Tag > 400) and ((Components[i] as TTeLabel).Tag < 600) then begin try stablename := (Components[i] as TTeLabel).Name; stablename := copy(stablename,1,4); cdsTemp := TInfoClientDataSet.Create(self); cdsTemp.ProviderName := 'GLModule.qrySelect'; with cdsTemp do begin close; sql.clear; sql.add(' select a.ctime, b.is_pay from orderh a, orderb b '); sql.add(' where a.no = b.no and b.is_pay = ''N'' '); sql.add(' and a.stablecode = ''' stablename ''' '); sql.add(' group by a.cdate, a.ctime, b.is_pay order by a.cdate, a.ctime desc '); open; end; (Components[i] as TTeLabel).Caption := cdsTemp.fieldbyname('ctime').asstring; finally cdsTemp.Free; end; end; end; |
jest0024
高階會員 發表:11 回覆:310 積分:224 註冊:2002-11-24 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |