線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1835
推到 Plurk!
推到 Facebook!

form 的詳細屬性問題!? 有關 抬頭

答題得分者是:jow
kyoti
一般會員


發表:3
回覆:7
積分:2
註冊:2008-03-02

發送簡訊給我
#1 引用回覆 回覆 發表時間:2008-03-19 14:26:31 IP:122.116.xxx.xxx 訂閱
打算做個logo出來~但是抬頭  就是藍色那一條!?
不知道要如何關掉~

請問一下該如何解決~!?
謝謝
ikk
尊榮會員


發表:4
回覆:413
積分:768
註冊:2003-06-30

發送簡訊給我
#2 引用回覆 回覆 發表時間:2008-03-19 14:39:45 IP:140.116.xxx.xxx 訂閱
通常都是自行繪製一個圖片, 程式只顯示此一圖片的外圍區域.
使用關鍵字去搜查尋文章吧,

[code cpp]
void __fastcall TForm1::FormCreate(TObject *Sender)
{
HRGN rethRgn;
rethRgn=CreateRoundRectRgn(0,0,Form1->Width,Form1->Height,50,50); //圓角矩形
SetWindowRgn(Form1->Handle,rethRgn,True);
}
[/code]
------
FPGA驗證, FPGA開發平台, http://smims.com
kyoti
一般會員


發表:3
回覆:7
積分:2
註冊:2008-03-02

發送簡訊給我
#3 引用回覆 回覆 發表時間:2008-03-19 15:04:58 IP:122.116.xxx.xxx 訂閱
 程式只顯示此一圖片的外圍區域.!???這句我不太懂~

目前我圖做好了,form方面autosize選ture基本上 這個form就是我的圖了,就差上面!~的抬頭(放大,縮小,結束的那一列)



===================引 用 ikk 文 章===================
通常都是自行繪製一個圖片, 程式只顯示此一圖片的外圍區域.
使用關鍵字去搜查尋文章吧,
編輯記錄
kyoti 重新編輯於 2008-03-19 15:59:39, 註解 無‧
jow
尊榮會員


發表:66
回覆:751
積分:1253
註冊:2002-03-13

發送簡訊給我
#4 引用回覆 回覆 發表時間:2008-03-19 16:15:28 IP:210.66.xxx.xxx 訂閱
BorderStyle 設定成 bsNone...
kyoti
一般會員


發表:3
回覆:7
積分:2
註冊:2008-03-02

發送簡訊給我
#5 引用回覆 回覆 發表時間:2008-03-19 16:46:22 IP:122.116.xxx.xxx 訂閱
謝謝你的回答~ 
現在如果是子視窗的話 mdichild~BorderStyle 設定成 bsNone 會沒有效用
請問還有其他的方法嗎!?
===================引 用 jow 文 章===================
BorderStyle 設定成 bsNone...
hipig
高階會員


發表:31
回覆:75
積分:111
註冊:2007-01-15

發送簡訊給我
#6 引用回覆 回覆 發表時間:2008-03-19 17:09:26 IP:140.126.xxx.xxx 未訂閱
比較好奇
你想做的是類似程式起始的載入畫面嗎?
kyoti
一般會員


發表:3
回覆:7
積分:2
註冊:2008-03-02

發送簡訊給我
#7 引用回覆 回覆 發表時間:2008-03-19 17:56:20 IP:122.116.xxx.xxx 訂閱
恩 有的 第一部分 就是所謂的logo 就是~~~程式起始的載入畫面~~

第二部分的話 想幫主程式設計較美觀的起始畫面
===================引 用 hipig 文 章===================
比較好奇
你想做的是類似程式起始的載入畫面嗎?
jow
尊榮會員


發表:66
回覆:751
積分:1253
註冊:2002-03-13

發送簡訊給我
#8 引用回覆 回覆 發表時間:2008-03-21 09:51:58 IP:210.66.xxx.xxx 訂閱
程式起始載入畫面

謹供參考...

[code delphi]
program Test057;

uses
Forms,
fMain in 'UNIT\fMain.pas' {frmMain},
fSplash in 'UNIT\fSplash.pas' {frmSplash};

{$R *.res}

begin

Application.Initialize;


//frmSplash 宣告在 fSplash.pas
frmSplash := TfrmSplash.Create(Application);

//然後,在TfrmMain.OnActivate()時,關閉並釋放frmSplash
Application.CreateForm(TfrmMain, frmMain);

Application.Run;

end.

[/code]

[code delphi]
unit fMain;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TfrmMain = class(TForm)
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
public
end;

var
frmMain: TfrmMain;

implementation

uses fSplash;

{$R *.dfm}

procedure TfrmMain.FormCreate(Sender: TObject);
var
I: Integer;
begin
//Initial(模擬載入進度)
if frmSplash <> nil then
begin
frmSplash.Gauge1.MinValue := 0;
frmSplash.Gauge1.MaxValue := 99;
for I := 0 to 99 do
begin
frmSplash.Gauge1.Progress := I;
Application.ProcessMessages;
Sleep(50);
end;
end;
end;

procedure TfrmMain.FormActivate(Sender: TObject);
begin
if frmSplash <> nil then
begin
frmSplash.Close;
FreeAndNil(frmSplash);
end;
end;

end.

[/code]


[code delphi]
unit fSplash;

interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Gauges;

type
TfrmSplash = class(TForm)
Gauge1: TGauge;
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
public
procedure DrawBackImage(fn: string);
end;

var
frmSplash: TfrmSplash;

implementation

{$R *.dfm}

procedure TfrmSplash.FormCreate(Sender: TObject);
begin
BorderStyle := bsNone;
FormStyle := fsStayOnTop;
Position := poScreenCenter;
Gauge1.Top := ClientHeight - Gauge1.Height - 10;
Show();
Update();
end;

procedure TfrmSplash.FormPaint(Sender: TObject);
begin
DrawBackImage('C:\TEST.BMP');
end;

procedure TfrmSplash.DrawBackImage(fn: string);
var
b: TBitmap;
begin
if FileExists(fn) then
begin
b := TBitmap.Create;
try
b.LoadFromFile(fn);
Canvas.Lock;
try
Canvas.StretchDraw(ClientRect,b);
finally
Canvas.Unlock;
end;
finally
FreeAndNil(b);
end;
end;
end;

end.

[/code]

程式碼下載:
http://delphi.ktop.com.tw/download.php?download=upload/47e31382e8f2f_Test057.zip


啊! 弄錯工具了!! >''<
編輯記錄
jow 重新編輯於 2008-03-21 09:54:33, 註解 啊! 弄錯工具了!! >''<‧
系統時間:2024-04-24 13:06:36
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!