Delphi OpenDialog使用方法
作者:互联网
var OpenDlg: TOpenDialog; strFileName: string; begin OpenDlg := TOpenDialog.Create(nil); try OpenDlg.Filter := '协议文件(*.EXE)|*.EXE|全部文件(*.*)|*.*'; OpenDlg.DefaultExt := '*.EXE'; if OpenDlg.Execute then begin strFileName := Trim(OpenDlg.FileName); if strFileName <> '' then begin edtProtocolApplication.Text := strFileName; end; end; finally FreeAndNil(OpenDlg); end; end;
标签:begin,EXE,end,strFileName,Delphi,OpenDialog,OpenDlg,方法,TOpenDialog 来源: https://www.cnblogs.com/jijm123/p/14193636.html