全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1160
推到 Plurk!
推到 Facebook!

TPdf component 問題?

答題得分者是:william
hmlam
一般會員


發表:21
回覆:8
積分:5
註冊:2003-03-27

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-08-25 13:47:37 IP:210.0.xxx.xxx 未訂閱
本人寫了一個delphi program,用了TPdf 一個 component 在沒有acrobat reader 的電腦, 開始execute 個程式就立即pop up error message. 問題: 1.不是應該行到用TPdf 的一句先會出現error? 2.如果解決? thx 大家
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-08-25 13:56:33 IP:147.8.xxx.xxx 未訂閱
1) you put it on a form? So erro occurs when the form is being created 2) create the component at runtime and catch all exception, e.g.
try
    Pdf := TPdf.Create(self);
except
    { error, porbably no acrobat reader }
end;
hmlam
一般會員


發表:21
回覆:8
積分:5
註冊:2003-03-27

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-08-25 14:48:23 IP:210.0.xxx.xxx 未訂閱
procedure Form1.FormCreate(Sender: TObject); var Pdf1 : TPdf begin try Pdf1 := TPdf.Create(self); except showmessage('error'); application.Free; end; end; 問題一樣出現, no acrobat reader computer cannot run this program
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-08-25 15:13:18 IP:147.8.xxx.xxx 未訂閱
Don't put Pdf component on your form and uncheck 'Stop on Delphi Exceptions'.
hmlam
一般會員


發表:21
回覆:8
積分:5
註冊:2003-03-27

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-08-25 16:00:36 IP:210.0.xxx.xxx 未訂閱
如果我一定要在form 中create tpdf component 沒有其他方法﹖
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-08-25 16:12:09 IP:147.8.xxx.xxx 未訂閱
引言: 如果我一定要在form 中create tpdf component 沒有其他方法﹖
class="code">begin Application.Initialize; try Application.CreateForm(TForm1, Form1); except { error } end; Application.Run; end. BTW, I still think creating the compoent at runtime is better.
系統時間:2024-05-20 6:56:39
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!