文件保存在指定文件夹下 |
尚未結案
|
zzmbeyond01
中階會員 發表:98 回覆:167 積分:53 註冊:2003-09-07 發送簡訊給我 |
|
ralph
初階會員 發表:41 回覆:82 積分:29 註冊:2003-02-04 發送簡訊給我 |
|
zzmbeyond01
中階會員 發表:98 回覆:167 積分:53 註冊:2003-09-07 發送簡訊給我 |
ralph 大大:
这个新文件还没有在TXT文件夹下创建呢。
要打开的(指定格式的)新文件客户是随机的,然后我想在程序中指定一个位置
如TXT文件夹下,把客户选择的新文件以txt格式保存下来。 顺便在问一个问题:
procedure TForm1.Button1Click(Sender: TObject); var od:TOpendialog; Memo:Tmemo; begin od:=TOpenDialog.create(self); Memo:=TMemo.create(self); <-为什么说没有指定memo的父窗体呢! >> 谢谢! |
ralph
初階會員 發表:41 回覆:82 積分:29 註冊:2003-02-04 發送簡訊給我 |
You define your format of TXT and the save like the following..... procedure TForm1.Button1Click(Sender: TObject);
begin
//If you want to save TXT into the default directory(c:\txt)
//If you did not create a TXT directory, it will show the window like "My Document "
SaveDialog1.InitialDir := 'c:\txt';
SaveDialog1.Filter := 'Text files (*.txt)|*.TXT';
SaveDialog1.Execute;
end; Memo:=TMemo.create(self); <-为什么说没有指定memo的父窗体呢!
It is not this line error. The error is on "memo.lines.clear ;" You should add this line after "Memo:=TMemo.create(self);"
memo.ParentWindow := form1.Handle; <== Add
|
zzmbeyond01
中階會員 發表:98 回覆:167 積分:53 註冊:2003-09-07 發送簡訊給我 |
|
ralph
初階會員 發表:41 回覆:82 積分:29 註冊:2003-02-04 發送簡訊給我 |
|
zzmbeyond01
中階會員 發表:98 回覆:167 積分:53 註冊:2003-09-07 發送簡訊給我 |
|
zzmbeyond01
中階會員 發表:98 回覆:167 積分:53 註冊:2003-09-07 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |