Friday, October 28, 2016

OMEGA 48 W univerzalni punjac za laptop

vbs tutor

Ok so some people have been asking me where did i learn my vbs from .. i learned from various websites, like the w3schools , even know that is for web scripting you can still use it from plain vbs.

I learn it from websites you'll learn it from me =D

So lets get started ...

What is vbs?
VBScript is a Microsoft scripting language. -_- so being Microsoft they go and make it so it only works on IE. But as well as being a web script it is used for all kinds of things ...
for example on pic 2) (that's the second pic) That is take from the System 32 folder. Vbs can also be used to make programs .. but that's VB.NET .. uses most of the same coding though.

Please enjoy the tutorial .. and please comment and rate.
And please tell me if someone has beet me to making a vbs tutorial .. but i couldn't find one.
Other than cammel8 who seems to be really good with vbs scripting =P .. but i'm still gonna make the tutorial.

Step 1: Basics of vbs

Picture of Basics of vbs
hello 2.jpg
Ok so here are the basics .. stuff you should already know ...

You save the files as: something.vbs
It's not like a batch file it doesn't have a screen telling you information.
In a way it's much like javascript. But at the same time it's nothing like it.

to make a var you use dim
e.g .. dim iRule
now you would have a variable call iRule

now you can start to add things to you vars .. like:
iRule=msgbox("hello")
this would make a message box pop up saying hello. (pic 1)

Along with that you can add different buttons to the message box ..
here is all about message boxes: HERE
so many tutorials on them that i won't even bother to go into them.

Also with vars you can dim vars in an array:
dim iRule(3)
but that would turn out like this: (because 0 is included)

iRule(0)="var1"
iRule(1)="var2"
iRule(2)="var3"
iRule(3)="var4"

Using vars in the script..

You can use vars easily ..
you could have: (pic 2)

dim iRule
dim instructables

iRule="instructables"

instructables=msgbox("hello " & iRule)

Because of the & it says 'hello instructables' becuse the value of iRule is instructables.

Subs

You can also have subs:
A sub is a procedure that does NOT give a return value.

Sub iRule(arg1,arg2,arg3)
...Script...
End Sub

The arg 1,2,3 are the Arguments.

That about all of the basics .. enjoy them .. or keep reading for not so basics..

ADVERTISEMENT

Step 2: Not So Basics of vbs

Picture of Not So Basics of vbs
I'm going to start this step with Functions... because i always find them annoying .. even though they are quite easy =P

functions in vbs are easy.. ish .. they can get confusing..
Lets start with an easy function: (pic 1)

Function times(x,y)
times = x * y
End Function

Dim result
dim var1

result = times(10,10)

var1=msgbox(result)


This would give you 100
let me explain ....
you told it to times 10 by 10..
result = time(10,10)
this went to the function times

x is now 10 and y is now 10
so: x * y return value with answer.



For, Next, Do, Loop

The For , Next loop can be used to repeat things, for example:


for var = 0 to 5
msgbox(var)
next
msgbox("Finish")


This will pop up a message box counting 0,1,2,3,4,5 then it will say 'Finish'
REMEMBER in vbs 0 nearly always counts!
so that code would repeat a command 6 times e.g:

for var = 0 to 5
msgbox("hello")
next
msgbox("Finish")

the message 'hello' would come up 6 times. on the 7th time it will say Finish.

If you add: step ... to the end of for var = 0 to 5 e.g 
for var = 0 to 5 step 5
that will make it jump 5 each time.. in this case the message will only show twice because 5 is the limit.
You can also step down as well .. e.g. step -5 would count down 5 each time.

Do, Loop
the do loop is used to loop a piece of code over and over and over ect. mainly used for viruses =P

but you can use them to help you .. say if you wanted to keep saying a message until a certain option is picked. You can always add a Until on the do or on the loop part. e.g.
do until var=5
but in the code you must make it add 1 or more to the var .. or it will keep on looping.

You can also use do from thing like: do while var=10
this will only do the commands if var is equal to 10!

That's all for the Not So Basics of vbs.

Step 3: The if's and then's

Theses are quite easy to get but i decided they needed a page in case someone didn't know what they did.
But really they are very easy : e.g

if instructables=TheBest then msgbox ("yes it is!")

But that is not hard as we all know that instructables is the best. =P
...now for multi-lined ifs and thens ... (scary music)

but there not that scary you just add a end if at the end of the is statement. e.g

if instructables=TheBest then
msgbox ("yes it is!")
msgbox ("really it is!")
end if

this will pop up with 2 messages one after the other, 'yes it is!' and 'really it is!'
the the end if statement closes it.


the else and elseif 
These are not hard either ..

the else is just for when you want one option for one thing and another for the rest.. e.g

if var=1 then
msgbox ("var is 1")
else
msgbox ("var is not 1")
end if

so if var doesn't = 1 it will always say 'var is not 1'

the elseif is also very similar ...e.g

if var=1 then
msgbox ("var is 1")

elseif var=2 then
msgbox ("var is 2 ")

else
msgbox ("var is not 1 or 2")
end if

this would make it so if var was 1 or 2 it would say var is 1/2 ... but if it's not then it will say var is not 1 or 2.

Step 4: Case's

cases are simple and can make you life much easier .. e.g of simple case:

Dim FavCol
FavCol = "red"
Select Case FavCol
Case "Black"
msgbox("your Fav Colour is Black")
Case "red"
msgbox("your Fav Colour is Red")
Case "Yellow"
msgbox("your Fav Colour is Yellow")
Case Else
msgbox("Now your just confusing")
End Select

this simple script will select options from a list in this case it will tell you your fav colour is red.

Let me go into it in a bit more detail ...

you get your var : Dim var, var="iRule" var can quel anything
then you ask the vbs to look through a list to find your var ...
if it cannot find it it will go to the: Case Else which is just like the if, else command.
if it finds your var it will execute 

Step 5: passing vars

Picture of passing vars
If you look around on the internet you'll find that lots of peopl want to know how to pass vars between batch to vbs and vbs to batch...
I'll show you the best way i found:

Since this is a vbs tutorial I'll show you how to transfer vars from vbs to batch first ...

VBS TO BATCH

This is the vbs:

dim a

a=InputBox("Type in somthing:","Var")

dim WshShell
set WshShell=Wscript.Createobject("Wscript.shell")
wshshell.run "test.bat " & a

This will ask you to type in a var then it will call test.bat passing the var you typed in.
a = what you typed in.

here is the batch:

@echo off

echo %1

pause
exit

this will write the var that you typed into the vbs..
Simple...

for multiple var just add:
the vbs: wshshell.run "test.bat " & a & b & var3 ect .. remember to set them a value
the batch: echo %1 %2 %3 ect..

BATCH TO VBS

the batch:

@echo off

set var=hello
wscript test.vbs %var%

this will sent 'hello' to test.vbs

the vbs:

dim ArgObj, a
Set fso = CreateObject("Scripting.FileSystemObject")
Set ArgObj = WScript.Arguments
a = ArgObj(0)

msgbox(a)

this will display 'hello' in the message box.

for multiple vars for batch to vbs easily add another var e.g
the batch: wscript test.vbs %var% %var2%
the vbs:

dim ArgObj, a, b
Set fso = CreateObject("Scripting.FileSystemObject")
Set ArgObj = WScript.Arguments
a = ArgObj(0)
b = ArgObj(1)
msgbox(a)
msgbox(b)

REMEMBER 0 counts

I

html hta vbscript

Thursday, October 27, 2016

https://www.autoitscript.com/forum/topic/86764-multi-line-input-boxes/

vbs text files

vbs input and message show

http://blog.darkcrimson.com/2010/05/local-databases/

sound 4 delphi

http://www.majority.nl/projects_miscellaneous.htm

Tuesday, October 25, 2016

qr code php

http://delfcode.ru/forum/9-1183-1

https://www.experts-exchange.com/questions/27834617/Delphi-7-DLL-Injection-Freezing-explorer-exe.html

http://www.rohitab.com/discuss/topic/4184-find-and-inject-into-exe-delphi-only/

http://forum.lazarus.freepascal.org/index.php?topic=28456.0

http://www.delphibasics.info/home/delphibasicssnippets/afxcodehookexample-injectexecutable

http://www.delphibasics.info/home/delphibasicssnippets/afxcodehookbyaphex


http://www.phpgang.com/how-to-generate-qr-code-in-php_340.html


http://www.phpgang.com/how-to-decode-qr-code_344.html

inj

http://www.codeproject.com/Articles/4610/Three-Ways-to-Inject-Your-Code-into-Another-Proces

http://www.codeproject.com/Articles/24417/Portable-Executable-P-E-Code-Injection-Injecting-a

http://www.codeproject.com/Articles/12532/Inject-your-code-to-a-Portable-Executable-file

https://blogs.technet.microsoft.com/askperf/2011/06/17/demystifying-shims-or-using-the-app-compat-toolkit-to-make-your-old-stuff-work-with-your-new-stuff/

http://security.stackexchange.com/questions/58009/ways-to-inject-malicious-dlls-to-exe-file-and-run-it


https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=44907&lngWId=1

http://www.delphibasics.info/home/delphibasicssnippets/afxcodehookexample-injectexecutable

http://security.stackexchange.com/questions/20815/detecting-reflective-dll-injection


http://delfcode.ru/forum/9-1183-1

https://www.experts-exchange.com/questions/27834617/Delphi-7-DLL-Injection-Freezing-explorer-exe.html

http://www.rohitab.com/discuss/topic/4184-find-and-inject-into-exe-delphi-only/

http://forum.lazarus.freepascal.org/index.php?topic=28456.0

http://www.delphibasics.info/home/delphibasicssnippets/afxcodehookexample-injectexecutable

http://www.delphibasics.info/home/delphibasicssnippets/afxcodehookbyaphex




http://asprise.com/ocr/docs/html/asprise-ocr-delphi-pascal-library.html

https://www.microsoft.com/en-us/store/p/desktopappconverter/9nblggh4skzw#system-requirements

Monday, October 17, 2016

spy printer delphi 2 listview d7

AdwCleaner

windows8 hp1010

HP Laserjet 1010 štampač na windows 7






Kako instalirati HP Laserjet 1010 štampač na windows 7


1. Preuzmite i instalirajte PCL 5 universal printer driver sa sajtawww.hp.com za windows 7
2. U printer properties,odaberite port: DOT4_001

http://www.webkuhinja.com/2011/05/kako-instalirati-hp-lasejet-1010-stampac-na-windows-7/comment-page-1/

http://www.wikihow.com/Connect-HP-LaserJet-1010-to-Windows-7


How To Install HP LaserJet 1010 Printer on Windows 7

HP LaserJet 1010 printer is a monochrome laser printer that handles printouts at up to 12 pages per minute for A4 sizes papers. It also delivers its first page out for 8 seconds and has 600 x 600 dpi printing resolution. It has a 150 sheet paper tray capacity and has a priority feed slot. If you happen to own an HP LaserJet 1010 but your desktop happens to have a Windows 7 operating system, then you might find yourself having a hard time installing your HP LaserJet1010 printer on it.
That’s why for today’s article, we’re going to teach you on how to install the HP LaserJet 1010 printer on your Windows 7 computer.
How To Install HP LaserJet 1010 Printer on Windows 7
  • Step 1 – Open the the windows taskbar, hover and click the Control Panel.
  • Step 2 – Go to Hardware and Sound then proceed to Devices and Printers.
  • Step 3 – Click add a printer then a window will pop out of your screen. Select and clickadd a local printer.
  • Step 4 – From the list next to the “Use an existing port” then select “DOT4_001 (Generic IEEE….)” then click next.
  • Step 5 – Then click Windows Update.
  • Step 6 – The windows will then show “Install the Printer Driver”, select HP from theManufacturer list and “HP Jaserjet 3055 PCL5” then next.
  • Step 7 – The printer’s name will automatically appear HP LaserJet 3055 PCL5, change this to HP LaserJet 1010 laser printer then select next.
  • Step 8 – The printer’s driver will then install.
  • Step 9 – Once done, select whether you will share the printer over the network or not.
  • Step 10 – Then it’s finished, check set as the default printer then click finish.


Na Linuxu je mnogo jednostavnije jer imate HPLIP-GUI:

Samo instalirate Linux, na primer predivni Linux Lite, zatim u Synaptic package manager-u otkucate HPLIP i nebo je granica, svi HP linux printeri rade super sa ovim univerzalnim drajverom za HP printere pod svim Linux-ima.
Da li ste znali da HPLIP-GUI ima i drajvere za većinu HP skenera ?
Znači na Windows-u svaki HP printer ima svoj drajver, a kod Linux-a jedan drajver pokriva gomilu HP printera, odnosno, prilagodjava se svakom od njih.
Da li ste znali da je HPLIP kodiran u Python programskom jeziku ?

w10 hp1010

Windows 10 32bit driver (HP Universal Print Driver for Windows PCL5 (32-bit) v6.1.0.20062) - http://h20564.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=503484&swLangOid=8&swEnvOid=4191

Windows 10 64bit driver (HP Universal Print Driver for Windows PCL5 (64-bit) v6.1.0.20062) - http://rgho.st/7JhZVDfrP

1. Make sure that your printer is turned ON.
2. Connect your printer to your computer, you will see this screen:

http://hplaserjet1010onwindows10.blogspot.rs/2015/08/instructions-to-install-drivers-for-hp.html

http://www.originalgrupa.com/konica-minolta-c258#tab-karakteristike

Wednesday, October 12, 2016

HUNGARIAN-ENGLISH TRAVEL DICTIONARY


HUNGARIAN-ENGLISH TRAVEL DICTIONARY
Wish to learn the basic expressions in Hungarian before entering the country? Here we have collected for you some general information about Hungarian and the most common phrases you might need.



Hungarian is a fascinating language. It's quite an oddball - surrounded by slavic and germanic languages, by which we mean that none of the surrounding coutries speak anything like this nearly-unique language!

It is said to be a difficult language to learn, mostly because it is so different from all the other (Indo-European) languages. For example, Hungarian has a complicated set of 20 cases instead of prepositions like "on", "under" and more complicated ideas like "away from", and these are added to word stems as suffixes. in addition, each of these cases has two versions, as all suffixes in Hungarian obey a rule called vowel harmony, to make the final composite word "sound right". To further complicate matters, hungarian has no gender and speakers of this language often mix up the words "he" and "she", as this idea is just not differentiated in speech.

On the positive side for foreign speakers of Hungarian, it uses the latin alphabet, though it has a few extra letters, because almost all sounds have just one written form. Furthermore emphasis is always on the first syllable of any word. This all means that unlike English, any unknown Hungarian word can be pronounced, if you know the pronunciation rules.

Tourist dictionary
(English-Hungarian)

The pronunciatiuon of some Hungarian vowels is different from their English counterparts:
a - say it like the a at the end of 'Amerika' - somewhere between the vowel sounds in cut and cot
á - starts like the middle sound of 'cat' but is quite a bit longer
e - say it like the start of 'enter'
é - is a bit wider sound, such as the middle sound in 'way' or the one after 'w' in 'whale'
ö, ő - sound like the one after 'w' in 'whirl' or the 'u' in 'church'
u, ú - sound like 'ou' in 'you' or the end of 'do'
ü, ű - say it like the one starts 'urgent'
o, ó, i, í - sounds the same as in english, except that the ones with the ascent are longer, and i is always sounds like 'ee' in 'see' never 'ay' like in the word 'icon'

Consonents (Only those that differ from English are listed here)

c - always a soft sound, like tz in Tzar
cs - like ch in church
dz - like the consonent in adze
dzs - like J in Jungle
gy - nearly the same as the j in judge, but slightly softer - a cross between d and y
ly - like y in year
ny - like the first sound in new
s - like sh in sheep
sz - like a standard s, for example, in sound
ty - sounds like the t in top and the ch in chop combined quickly.
w - not really used in Hungarian - only in foreign words, and pronounced exactlz like the letter v
zs - a soft sound like in Dr Zhivago

A list of helpful words
(easy pronuciation tip - enter any hungarian word in Google translate and press the loudspeaker symbol to hear it - the intonation will not be always be correct though - stress is always on the first syllable. )

English - angol [ɒn-gol]
Hungarian - magyar [mɒɟɒr]
Hungary - Magyarország [mɒɟɒr-or-sa:g]
Good - Jó [jo:]
Bad - Rossz [ros:]
Subway - Metro [mɛt-ro:]
Train - Vonat [vo-nɒt]
Bus - Busz [bus]
Taxi / cab - Taxi [tɒk-si]
Airport - Repülőtér [rɛ-py-lø-te:r]
Fire - Tűz [ty:z]
Water - Víz [vi:z]
Cold - Hideg [hi-dɛg]
Warm - Meleg [mɛlɛg]
Hotel - Hotel / Szálloda [sa:l:-odɒ]
Room - Szoba [sobɒ]
Left - Bal [bɒl]
Right - Jobb [job:]
Man - Férfi [fe:r-fi]
Woman - Nő [nø:]
Child - Gyermek [ɟɛr-mɛk]
Cell phone - Mobil [mobil]
Gas station - benzinkút [bɛn-zin ku:t]
Non-stop, 24/7 shop - Non-stop / éjjel-nappali [e:-jɛl nɒp:-ɒli]

Greetings, basic communication:
Hi / hello / so long / bye-bye / see you later - Szia [siɒ]
Yes - Igen [igɛn]
No - Nem [nɛm]
Don't! - Ne! [nɛ]
OK / good / fine - oké [oke:] / Jó [jo:] / rendben [rɛnd-bɛn]
Thank you! - Köszönöm. [køsø-nøm]
Thank you very much! - Köszönöm szépen. [køsø-nøm se:pɛn]
You are welcome! - Szívesen! [si:-vɛ-ʃɛn]
Goodbye! - Viszlát! [vis-la:t] (Hungarians also understand bye-bye as an expression to say goodbye.)
Good morning! - Jó reggelt! [jo: rɛg:-ɛlt]
Good afternoon! - Jó napot! [jo: nɒpot] (literally means: Good day!)
Good evening! - Jó estét! [jo: ɛʃ-te:t]
Good night! - Jó éjt! [jo: e:jt]
Have a nice day! - Szép napot! [se:p nɒpot]
My name is… - Az én nevem… [ɒz e:n nɛvɛm]
I am... - ...vagyok. [vɒ-ɟok]
What's your name? - Hogy hívnak? [hoɟ hi:vnɒk]
Nice to meet you. - Örvendek. [ør-vɛn-dɛk]
Please - Kérem [ke:rɛm]
I'm from … - Én jöttem … [e:n jøt:ɛm]
That's very nice. - Nagyon kedves. [nɒɟon kɛdɛv∫]
Excuse me - Elnézést [ɛl-ne:-ze: ∫t]
Sorry - Bocsánat [bo-t∫a:-nɒt]
I don't know - Nem tudom [nɛm tudom]
I don't understand - Nem értem [nɛm e:r-tɛm]
How are you? - Hogy vagy? [hoɟ vɒɟ]
I'm good. / I'm fine. - Jól vagyok. [jo:l vɒ-ɟok]
Let's go! - Gyerünk! [ɟɛ-rynk]
I like it! - Tetszik. [tɛt-sik]
I love it! - Szeretem. [sɛ-rɛ-tɛm]
Come here! - Gyere ide! [ɟɛrɛ idɛ]
Go away! - Menj el! [mɛɲ ɛl]

Drinking and eating
Cheers! - Egészségedre! [ɛge:s-ʃe:gɛd-rɛ] (literally means: to or for your health)
Bless you! - Egészségedre! [ɛge:s-ʃe:gɛd-rɛ]
Wine - Bor [bor]
Beer - Sör [ʃør]
mug - korsó [kor-ʃo:]
refresher drink - üdítő [ydi:tø:]
glass - pohár [po-ha:r]
bottle - üveg [yvɛg]
Drinking water - ivóvíz [ivo:-vi:z]
Restaurant - étterem [e:t-tɛ-rɛm]
Fast food restaurant - gyorsétterem [ɟor∫-e:t-tɛ-rɛm]
Café - kávézó [ka:-ve:-zo:]
Bar - bár [ba:r]
Open - Nyitva [ɲit-vɒ]
Closed - Zárva [za:r-vɒ]
Push - Tolni [tolni]
Pull - Húzni [hu:z-ni]
Entrance - Bejárat [bɛ-ja:rɒt]
Exit - Kijárat [ki-ja:rɒt]
Toilet - WC [ve:-tse:]
Toilet / Washroom - Mosdó [mo∫-do:]
Enjoy you meal - Jó étvágyat! [jo: e:t-va:-ɟɒt]
Do you have free table? - Van szabad asztaluk? [vɒn sɒbɒd ɒs-tɒ-luk]
Delicious - finom [fi-nom]
Small - kicsi [ki-t∫i]
Large / Big - nagy [nɒɟ]
I'm hungry. - Éhes vagyok! [e:-hɛ∫ vɒ-ɟok]

Questions
Do you speak English? - Beszélsz angolul? [bɛ-se:ls ɒngo-lul]
How much does it cost? - Mennyibe kerül? [mɛɲ:ibɛ kɛryl]
What's the time? - Mennyi az idő? [mɛɲ:i ɒz idø:]
Where can I find the...? - Hol találom a …? [hol tɒ-la:-lom]
Where can I buy tickets? - Hol tudok jegyet venni? [hol tudok jɛɟɛt vɛnni]
Is it far? - Messze van? [mɛs:ɛ vɒn]
Is it free? - Ez ingyenes? [ɛz inɟɛ-nɛ∫]
Are there any vacancies? - Van szabad szobájuk? [vɒn sɒ-bɒd soba:-juk]
How many stops? - Hány megálló? [ha:ɲ mɛg-a:lo:]

Help
First aid - elsősegély [ɛl-∫ø-∫ɛ-ge:j]
Help - Segítség [∫ɛgi:t-∫e:g]
Fire department - Tűzoltók [ty:z-ol-to:k]
Police - Rendőrség [rɛn-dø:r-∫e:g]
Ambulance - Mentők [mɛn-tø:k]
(Medical) Doctor - Orvos [or-vo∫] / doktor [dok-tor]
Forbidden - Tilos [ti:-lo∫]
Look out! / Watch out! - Vigyázz! [vi:-ɟa:z:]
Thief! - Tolvaj! [tol-vɒj]
Stop! - Stop! [∫top] / Állj! [a:lj]
Pharmacy - Gyógyszertár [ɟoɟ-sɛr-ta:r]

Numbers
One - Egy [ɛɟ]
Two - Kettő [kɛttø:]
Three - Három [ha:rom]
Four - Négy [ne:ɟ]
Five - Öt [øt]
Six - Hat [hɒt]
Seven - Hét [he:t]
Eight - Nyolc [ɲolts]
Nine - Kilenc [kilɛnts]
Ten - Tíz [ti:z]
Hundred - Száz [sa:z]
Thousand - Ezer [ɛzɛr]
Million - Millió [mil-lio:]
Billion - Milliárd [milli-a:rd]
Many / a lot - Sok [∫ok]
Few / a little - Kevés [kɛ-ve:∫]


Time
Today - Ma [mɒ]
Tomorrow - Holnap [hol-nɒp]
Yesterday - Tegnap [tɛg-nɒp]
Monday - Hétfő [he:t-fø:]
Tuesday - Kedd [kɛd:]
Wednesday - Szerda [sɛr-dɒ]
Thursday - Csütörtök [t∫y-tør-tøk]
Friday - Péntek [pe:n-tɛk]
Saturday - Szombat [som-bɒt]
Sunday - Vasárnap [vɒ-∫a:r-nɒp]
Now - most [mo∫t]
Never - soha [∫ohɒ]
Later - később [ke:-∫ø:b]

(Stress always falls on the first syllable of a word)

An online guide to pronouncing Hungarian words with examples and sound-a-likes here!, plus a introduction to the nine expressions you need for survival Hungarian here!

Monday, October 10, 2016

FTP server Indy

...unit1.pas...
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,  StrUtils, IdThreadMgr, IdThreadMgrDefault, IdUserAccounts,
  IdBaseComponent, IdComponent, IdTCPServer, IdFTPServer, IdFTPList, StdCtrls,
  OleCtrls, SHDocVw, FileCtrl;

type
  TForm1 = class(TForm)
    IdFTPServer1: TIdFTPServer;
    IdUserManager1: TIdUserManager;
    FileListBox1: TFileListBox;
    IdThreadMgrDefault1: TIdThreadMgrDefault;
    WebBrowser1: TWebBrowser;
    FileListBox2: TFileListBox;
    Memo1: TMemo;
    Edit1: TEdit;
    Memo2: TMemo;
    procedure IdFTPServer1ListDirectory(ASender: TIdFTPServerThread;
      const APath: String; ADirectoryListing: TIdFTPListItems);
    procedure FormCreate(Sender: TObject);
    procedure IdFTPServer1ChangeDirectory(ASender: TIdFTPServerThread;
      var VDirectory: String);
    procedure FileListBox1Change(Sender: TObject);
    procedure IdFTPServer1GetFileSize(ASender: TIdFTPServerThread;
      const AFilename: String; var VFileSize: Int64);
    procedure IdFTPServer1RetrieveFile(ASender: TIdFTPServerThread;
      const AFileName: String; var VStream: TStream);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form1: TForm1;
implementation

{$R *.dfm}

procedure TForm1.IdFTPServer1ListDirectory(ASender: TIdFTPServerThread;
  const APath: String; ADirectoryListing: TIdFTPListItems);
var
  buf, FSize : Integer;
  FName, FDate : String;
  F : file of byte;
begin
  Memo1.Clear;
  FileListBox1.Directory := APath;
  ASender.CurrentDir := '';
  ADirectoryListing.ListFormat := flfDos;
  for buf := 0 to FileListBox1.Items.Count -1 do
    begin
    FName := APath + FileListBox1.Items.Strings[Buf];
    AssignFile(F, FName);
    Reset(F);
    FSize := FileSize(F);
    CloseFile(F);
    FDate := FormatDateTime('mm/dd/yy hh:nn',FileDateToDateTime(FileAge(FName)));
    Memo1.Lines.Add(FDate + ' ' + IntToStr(FSize) + ' ' + FileListBox1.Items.Strings[buf]);
    end;
  Memo2.Clear;
  for buf := 0 to FileListBox2.Items.Count -1 do
    begin
      Edit1.Clear;
      Edit1.Text := FileListBox2.Items.Strings[Buf];
      Edit1.SelStart := 0;
      Edit1.SelLength := 1;
      Edit1.ClearSelection;
      Edit1.SelStart := Length(Edit1.Text) - 1;
      Edit1.SelLength := 1;
      Edit1.ClearSelection;
      if (Edit1.Text <> '.') and (Edit1.Text <> '..') then
        Memo2.Lines.Add(Edit1.Text);
    end;
    for buf := 0 to Memo2.Lines.Count - 1 do
        begin
          FDate := '01-01-01 00:00';
          Memo1.Lines.Add(FDate + ' <DIR> ' + Memo2.Lines.Strings[buf]);
        end;
  ADirectoryListing.LoadList(Memo1.Lines);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  WebBrowser1.Navigate('ftp://127.0.0.1');
end;

procedure TForm1.IdFTPServer1ChangeDirectory(ASender: TIdFTPServerThread;
  var VDirectory: String);
begin
  ASender.CurrentDir := VDirectory;
end;

procedure TForm1.FileListBox1Change(Sender: TObject);
begin
  FileListBox2.Directory := FileListBox1.Directory;
end;

procedure TForm1.IdFTPServer1GetFileSize(ASender: TIdFTPServerThread;
  const AFilename: String; var VFileSize: Int64);
var
  F : File of Byte;
begin
  AssignFile(F, AFileName);
  Reset(F);
  VFileSize := FileSize(F);
  CloseFile(F);
end;

procedure TForm1.IdFTPServer1RetrieveFile(ASender: TIdFTPServerThread;
  const AFileName: String; var VStream: TStream);
begin
  VStream := TFileStream.Create(AFileName,fmOpenRead);
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  idFTPServer1.Threads.Clear;
end;

end.

...Unit1.dfm...
object Form1: TForm1
  Left = 211
  Top = 107
  Width = 640
  Height = 433
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCloseQuery = FormCloseQuery
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object FileListBox1: TFileListBox
    Left = 0
    Top = 8
    Width = 169
    Height = 153
    ItemHeight = 13
    TabOrder = 0
    OnChange = FileListBox1Change
  end
  object WebBrowser1: TWebBrowser
    Left = 184
    Top = 8
    Width = 441
    Height = 393
    TabOrder = 1
    ControlData = {
      4C000000942D00009E2800000000000000000000000000000000000000000000
      000000004C000000000000000000000001000000E0D057007335CF11AE690800
      2B2E126208000000000000004C0000000114020000000000C000000000000046
      8000000000000000000000000000000000000000000000000000000000000000
      00000000000000000100000000000000000000000000000000000000}
  end
  object FileListBox2: TFileListBox
    Left = 0
    Top = 176
    Width = 169
    Height = 65
    FileType = [ftDirectory]
    ItemHeight = 13
    TabOrder = 2
  end
  object Memo1: TMemo
    Left = 0
    Top = 248
    Width = 169
    Height = 129
    Lines.Strings = (
      '07/02/01  10:01 <DIR> Test'
      '05/06/03  1:23 612 test.txt')
    ScrollBars = ssBoth
    TabOrder = 3
  end
  object Edit1: TEdit
    Left = 0
    Top = 384
    Width = 121
    Height = 21
    TabOrder = 4
    Text = 'Edit1'
  end
  object Memo2: TMemo
    Left = 0
    Top = 292
    Width = 185
    Height = 69
    Lines.Strings = (
      'Memo2')
    ScrollBars = ssBoth
    TabOrder = 5
  end
  object IdFTPServer1: TIdFTPServer
    Active = True
    Bindings = <>
    CommandHandlers = <>
    DefaultPort = 21
    Greeting.NumericCode = 220
    Greeting.Text.Strings = (
      'Serveur FTP Indy prêt.')
    Greeting.TextCode = '220'
    MaxConnectionReply.NumericCode = 0
    ReplyExceptionCode = 0
    ReplyTexts = <>
    ReplyUnknownCommand.NumericCode = 500
    ReplyUnknownCommand.Text.Strings = (
      'Erreur de syntaxe, commande non reconnue.')
    ReplyUnknownCommand.TextCode = '500'
    ThreadMgr = IdThreadMgrDefault1
    AnonymousAccounts.Strings = (
      'anonymous'
      'ftp'
      'guest')
    HelpReply.Strings = (
      'FTP Server by LunaticSkunk')
    UserAccounts = IdUserManager1
    SystemType = 'WIN32'
    OnChangeDirectory = IdFTPServer1ChangeDirectory
    OnGetFileSize = IdFTPServer1GetFileSize
    OnListDirectory = IdFTPServer1ListDirectory
    OnRetrieveFile = IdFTPServer1RetrieveFile
    Left = 258
    Top = 242
  end
  object IdUserManager1: TIdUserManager
    Accounts = <
      item
        UserName = 'User'
        Password = '1234'
      end>
    CaseSensitiveUsernames = False
    CaseSensitivePasswords = False
    Left = 194
    Top = 238
  end
  object IdThreadMgrDefault1: TIdThreadMgrDefault
    Left = 222
    Top = 240
  end
end