Реферат: Файловая оболочка (Delphi 30 )
//пункта меню RUN в момент открытия меню FILE
begin
if (UpperCase(ExtractFileExt(MainForm.FileList.FileName))='.EXE') or
(UpperCase(ExtractFileExt(MainForm.FileList.FileName))='.COM') then
Open.Enabled:=True
else Open.Enabled:=False;
end;
procedure TMainForm.OpenClick(Sender: TObject);
//Запуск приложения со строкой параметров
begin
GetFormToCenter(RunForm);
RunForm.ShowModal;
end;
procedure TMainForm.DrBoxChange(Sender: TObject);
//Смена текущего диска и обносление СФ и СД
Var F:TSearchRec;
s:string;
begin
MainForm.Directory.Drive:=MainForm.DrBox.Drive;
MainForm.FileList.Directory:=MainForm.DrBox.Drive+':\';
S:=MainForm.FileList.Mask;
MainForm.FileList.Mask:='>.>';
FindFirst(MainForm.DrBox.Drive+':\*.*',faDirectory,F);
Repeat
Until ((FindNext(F)<>0) or ((F.Attr=faDirectory) and ((F.Name<>'.') or (F.Name<>'..'))));
if F.Attr<>faDirectory then
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\')
else
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\'+F.Name);