Make your function a methode of your thread object and call that methode.
dont get it how to make my procedure a method it has parmeter to be added by other string and other ms
DownloadToStream(const Url: string; ms: TMemoryStream);
any code example will be more better