DELPHI TRICK | |||||||
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function slash(value:string):string; begin if (value='') then result := '' else begin if (value[length(value)]<>'\') then result:=value+'\' else result:=value; end; end; function UniqueFilename(path:string):string; var c : char; begin repeat result := ''; randomize; repeat c:=chr(random(43)+47); if (length(result)=8) then result := result+'.' else if (c in ['0'..'9','A'..'Z']) then result := result+c; until length(result)=12; result := slash(path)+result; until not (fileexists(result)); end; procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := UniqueFilename('C:\Windows\Desktop'); end; end. |
Translate
Category
aktivitas hati
(14)
Berita
(2)
Cheat Point blank
(4)
Design
(22)
html
(4)
Humor dewasa
(4)
Humor Umum
(1)
lelaki
(4)
Open Source
(1)
pemrograman
(12)
Sms Lucu
(1)
Tebakan Lucu
(1)
Tentang cinta
(12)
Tips - Trik
(4)
wanita
(8)
web
(10)
Anda Tamu Ke -
Visitor
Visitor
Copy Paste
Blogroll
- >> Awalini Photograph
- >> Housting Murah
- >> Jukuren Shita
- >> DR. EKO
- >> Japan Motion
- >> Onino Creative Zone
- >> Photobucket Album
Update
»
pemrograman
» Membuat File Unik - DELPHI Trik
Silahkan Tulis Komentar Anda ...
Tunjukan apa yang kau harapkan................
komentar anda sangat berharga bagi kami