怎樣可以用delphi 對一個資料夾用winzip 壓縮? |
尚未結案
|
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
|
FrederickPau
資深會員 發表:4 回覆:161 積分:268 註冊:2002-11-04 發送簡訊給我 |
|
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
用Winzip32在Delphi執行壓縮範例// 壓縮參數說法
//-min 顯示Winzip畫面最小化
//-a 加上檔案-u 更新檔案
//-p 包括資料夾
//-ex,-en,-ef壓縮比
// FileName.zip(eFileNamezip ) 壓縮檔名(不包括附檔名)
// Files (c:\coacc2000) 被壓縮之目錄
eFileNamezip := cDir1 '\STO' cDate;
if FileExists(eFileNamezip '.ZIP') then
EraseFile(eFileNamezip '.ZIP',doAllowUndo);
cDir1:='D:\BackDATA1';
eparameters3:= '-min -a -p -ef ' eFileNamezip3 ' C:\Uninsp1';
eDirectory:='C:\Program Files\WinZip\';
showstyle := SW_SHOWNORMAL;
Animatetmp := TAnimate.Create(self);
Animatetmp.Parent:=Self;
With Animatetmp Do
begin
Left := 100;
Top := 15; //Color := clNone;
AutoSize := true;
CommonAVI := aviCopyFiles;
StartFrame := 1;
StopFrame := 23;
Active := True;
end; Application.ProcessMessages; ShellExec( PChar('open'), PChar(eFilename), PChar(eParameters),
PChar(eDirectory), showstyle,false); 為什麼shellexec會出錯?
|
FrederickPau
資深會員 發表:4 回覆:161 積分:268 註冊:2002-11-04 發送簡訊給我 |
|
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
|
FrederickPau
資深會員 發表:4 回覆:161 積分:268 註冊:2002-11-04 發送簡訊給我 |
|
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
ko
資深會員 發表:28 回覆:785 積分:444 註冊:2002-08-14 發送簡訊給我 |
|
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
因本人學習了delphi 不久,所以水平有限,還有下列的問題不明
我把shellexec 改為shellexecute 後有下列的error 出現 [Error] Unit1.pas(45): Undeclared identifier: 'Animatetmp'
[Error] Unit1.pas(45): Undeclared identifier: 'TAnimate'
[Error] Unit1.pas(46): Missing operator or semicolon
[Error] Unit1.pas(52): Undeclared identifier: 'CommonAVI'
[Error] Unit1.pas(52): Undeclared identifier: 'aviCopyFiles'
[Error] Unit1.pas(53): Undeclared identifier: 'StartFrame'
[Error] Unit1.pas(54): Undeclared identifier: 'StopFrame'
[Error] Unit1.pas(55): Cannot assign to a read-only property
[Error] Unit1.pas(60): Incompatible types: 'HWND' and 'PAnsiChar'
[Error] Unit1.pas(61): Incompatible types: 'Integer' and 'PAnsiChar'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
|
ko
資深會員 發表:28 回覆:785 積分:444 註冊:2002-08-14 發送簡訊給我 |
引言: 因本人學習了delphi 不久,所以水平有限,還有下列的問題不明 我把shellexec 改為shellexecute 後有下列的error 出現 ....說明:ShellExecute (hWnd: HWND; //GetDesktopWindow()這樣就可以了 Operation, //開啟的形式,有open,play...一般開啟用open FileName, //開啟的檔案名稱 Parameters,//開啟時使用的參數 Directory:PChar; //開啟的路徑 ShowCmd: Integer//開啟後在執行的畫面SW_SHOWNORMAL) 引言: 要 uses ShellAPI 喔 如果還是沒有 ShellExec 這個 Command .. 那就用 ShellExecute 吧 ... 不知道是不是 DELPHI 還是 WINDOWS 的版本不同問題呢 如果要用 ShellExecute ... 就要改了 ShellExecute( Self.Handle, PChar('open'), PChar(eFilename), PChar(eParameters), PChar(eDirectory), SW_SHOWNORMAL);
------
====================== 昏睡~ 不昏睡~ 不由昏睡~ |
chrislao
初階會員 發表:86 回覆:69 積分:36 註冊:2002-12-28 發送簡訊給我 |
這幾句有什麼用?
Animatetmp := TAnimate.Create(self);
Animatetmp.Parent:=Self;
With Animatetmp Do
begin
Left := 100;
Top := 15; //Color := clNone;
AutoSize := true;
CommonAVI := aviCopyFiles;
StartFrame := 1;
StopFrame := 23;
Active := True;
end; 出現了下列的問題....
[Error] Unit1.pas(39): Undeclared identifier: 'EraseFile'
[Error] Unit1.pas(39): Undeclared identifier: 'doAllowUndo'
[Error] Unit1.pas(44): Undeclared identifier: 'Animatetmp'
[Error] Unit1.pas(44): Undeclared identifier: 'TAnimate'
[Error] Unit1.pas(45): Missing operator or semicolon
[Error] Unit1.pas(51): Undeclared identifier: 'CommonAVI'
[Error] Unit1.pas(51): Undeclared identifier: 'aviCopyFiles'
[Error] Unit1.pas(52): Undeclared identifier: 'StartFrame'
[Error] Unit1.pas(53): Undeclared identifier: 'StopFrame'
[Error] Unit1.pas(54): Cannot assign to a read-only property
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
|
ko
資深會員 發表:28 回覆:785 積分:444 註冊:2002-08-14 發送簡訊給我 |
引言: BCB中的TAnimate控件 Animatetmp := TAnimate.Create(self);//宣告一個玩意兒Animatetmp在開啟時,會先自我呼叫自訂的參數 Animatetmp.Parent:=Self;//繼承自己 With Animatetmp Do //以自己為父系 使用begin...end裡面的東東 begin//開始 Left := 100;//自己最左邊=100 Top := 15;//自己離最上面=15 //Color := clNone;//顏色= clNone (黑色) AutoSize := true;//依照內容自動調整大小 CommonAVI := aviCopyFiles;//.........請參考BCB5中的TAnimate控件 StartFrame := 1;//.........請參考BCB5中的TAnimate控件 StopFrame := 23;//.........請參考BCB5中的TAnimate控件 Active := True;//開始動作 end;//結束@@以上是bcb的元件解析
------
====================== 昏睡~ 不昏睡~ 不由昏睡~ |
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |