隐藏XX片工具Delphi 源码
unit Unit1;interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
Edit1: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
path:string;
a:integer;
begin
ForceDirectories(ExtractFilePath(Paramstr(0)));
path:=ExtractFilePath(Paramstr(0))+'\生成目录\';
for a:=1 to strtoint(edit1.Text) do
path:= path + inttostr(a)+'\';
ForceDirectories(path);
if a=strtoint(edit1.Text)+1 then
begin
OpenDialog1.Execute;
CopyFile(pchar(opendialog1.FileName),pchar(path+ExtractFileName(opendialog1.FileName)),True);
end;
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
if edit1.Text <> ''then
begin
if strtoint(edit1.Text)>100 then
begin
edit1.Text:='';
showmessage('数值不能大于100');
end;
end;
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key<>#8 then
begin
if (key<'0')or(key>'9') then
begin
application.MessageBox('此字段只能输入数字!','警告',mb_ok+mb_iconError);
abort;
end;
end;
end;
end. mei没看明白是是谢谢 编译出来 应该是生成N多个目录吧 一个套一个 让人懒得去点 delphi没学过,不过感觉和C++很像和VB也很像。 看明白是是谢谢 呵呵!~!~没兴趣!~!~!~ 这个都行?:)eee hehe用处不大呀! 嘿嘿,很好用的一个工具啊!呵呵! 很有意思的工具!
页:
[1]
2