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

怎樣可以用delphi 對一個資料夾用winzip 壓縮?

尚未結案
chrislao
初階會員


發表:86
回覆:69
積分:36
註冊:2002-12-28

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-28 01:39:57 IP:202.175.xxx.xxx 未訂閱
...
FrederickPau
資深會員


發表:4
回覆:161
積分:268
註冊:2002-11-04

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-01-28 01:52:02 IP:61.228.xxx.xxx 未訂閱
chrislao
初階會員


發表:86
回覆:69
積分:36
註冊:2002-12-28

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-01-28 02:07:19 IP:202.175.xxx.xxx 未訂閱
用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

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-01-28 02:24:50 IP:61.228.xxx.xxx 未訂閱
什麼樣的錯呢?
chrislao
初階會員


發表:86
回覆:69
積分:36
註冊:2002-12-28

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-01-29 01:20:37 IP:202.175.xxx.xxx 未訂閱
在compile時出現 undeclared indentifire:'ShellExec' undeclared indentifire:'eFileName' undeclared indentifire:'showstyle'
FrederickPau
資深會員


發表:4
回覆:161
積分:268
註冊:2002-11-04

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-01-29 01:50:21 IP:61.228.xxx.xxx 未訂閱
要 uses ShellAPI 喔 如果還是沒有 ShellExec 這個 Command .. 那就用 ShellExecute 吧 ... 不知道是不是 DELPHI 還是 WINDOWS 的版本不同問題呢  如果要用
chrislao
初階會員


發表:86
回覆:69
積分:36
註冊:2002-12-28

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-01-29 02:01:43 IP:202.175.xxx.xxx 未訂閱
請問 Declaration expected but identifier 'Application' found 是什麼出錯?
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-01-29 07:17:29 IP:202.39.xxx.xxx 未訂閱
引言: 請問 Declaration expected but identifier 'Application' found 是什麼出錯?
看是不是有 begin 卻沒有 end 或有 end 卻沒 begin 或該有 ; 卻漏失等之類的錯誤。 -- 將進酒 杯莫停 與君歌一曲 請君為我傾耳聽
ko
資深會員


發表:28
回覆:785
積分:444
註冊:2002-08-14

發送簡訊給我
#9 引用回覆 回覆 發表時間:2003-01-29 12:10:55 IP:61.221.xxx.xxx 未訂閱
chrislao你好:  
引言: ShellExec( PChar('open'), PChar(eFilename), PChar(eParameters), PChar(eDirectory), showstyle,false); 為什麼shellexec會出錯?
因為... >>(
------
======================
昏睡~
不昏睡~
不由昏睡~
chrislao
初階會員


發表:86
回覆:69
積分:36
註冊:2002-12-28

發送簡訊給我
#10 引用回覆 回覆 發表時間:2003-01-29 12:58:13 IP:202.175.xxx.xxx 未訂閱
因本人學習了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

發送簡訊給我
#11 引用回覆 回覆 發表時間:2003-01-29 13:18:47 IP:61.221.xxx.xxx 未訂閱
引言: 因本人學習了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

發送簡訊給我
#12 引用回覆 回覆 發表時間:2003-01-29 21:37:22 IP:202.175.xxx.xxx 未訂閱
這幾句有什麼用? 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

發送簡訊給我
#13 引用回覆 回覆 發表時間:2003-01-30 11:44:56 IP:61.221.xxx.xxx 未訂閱
引言: 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

發送簡訊給我
#14 引用回覆 回覆 發表時間:2003-01-30 11:59:33 IP:202.39.xxx.xxx 未訂閱
[Error] Unit1.pas(44): Undeclared identifier: 'Animatetmp' 上行 Animatetmp 這個變數要宣告: var Animatetmp: TAnimate; [Error] Unit1.pas(44): Undeclared identifier: 'TAnimate' TAnimate 要 uses comctrls; -- 將進酒 杯莫停 與君歌一曲 請君為我傾耳聽
系統時間:2024-05-04 11:16:44
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!