Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Uses
CommDlg;
procedure TForm1.FileSaveAs1SaveDialogTypeChange(Sender: TObject);
var
I : Integer;
Fn, Ext : String;
ExtList : TStringList;
const
CB_FILENAME_ID = 1148;
begin
ExtList:=TStringList.Create;
try
ExtList.Delimiter:='|';
ExtList.DelimitedText:=FileSaveAs1.Dialog.Filter;
Ext:=ExtList.Strings[FileSaveAs1.Dialog.FilterIndex*2-1];
finally
ExtList.Free;
end;
I:=Pos(Ext,';');
if I>0 then Ext:=Copy(Ext,1,I-1);
Ext:=StringReplace(Ext,'*','',[rfReplaceAll]);
Fn:=ChangeFileExt(ExtractFilename(FileSaveAs1.Dialog.FileName),Ext);
SendMessage( GetParent(FileSaveAs1.Dialog.Handle), CDM_SETCONTROLTEXT, CB_FILENAME_ID, LongInt(Pchar(Fn)));
end;