![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Как вызвать ? [D5, WinXP]
SemFLY © (2002-07-12 18:23:00)Я создал отдельный поток TThread. А как теперь мне вызвать эту процедуру в основном модуле программы, RF.Execute не работает.
unit Lame_Rename;
interface
uses
Windows,
SysUtils,
Classes,
Dialogs,
Lame_Code;
type
RF = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
{ RF }
procedure RF.Execute;
var
PI: TProcessInformation;
Success: integer;
SearchRec: TSearchRec;
begin
WaitForSingleObject(pi.hProcess,Infinite);
Success := FindFirst(ExtractFileName(Form1.CheckListBox1.Items[i]),faAnyFile,SearchRec);
if Success = 0 then
begin
RenameFile(OutFile,SaveMp3 + ExtractFileName(ChangeFileExt((Form1.CheckListBox1.Items[i]),".mp3")));
end;
FindClose(SearchRec);
end;
end.
-------
Спасибо !
Skier (2002-07-12 18:26:00) [1]>SemFLY
constructor Create(CreateSuspended: Boolean);
Description
Call Create to create a thread in an application. If CreateSuspended is False, Execute is called immediately. If CreateSuspended is True, Execute won’t be called until after Resume is called.