?? unit1.~pas
字號:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Zlib;
type
TForm1 = class(TForm)
Button1: TButton;
Edit_dxg: TEdit;
Button2: TButton;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
ms1,ms2:TMemoryStream;
begin
ms1 := TMemoryStream.Create;
ms2 := TMemoryStream.Create;
try
try
ms1.LoadFromFile(OpenDialog1.FileName);
CompressStream(ms1, ms2,clmax);
if SaveDialog1.Execute then ms2.SaveToFile(SaveDialog1.FileName);
finally
ms1.Free;
end;
finally
ms2.Free;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then Edit_dxg.Text:=OpenDialog1.FileName;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -