TOPENDIALOG: How To USe it... lazarus / 31-LCL ---------------------------------------------------------------------- ecitoyen · 2010-08-11 23:57 TOpenDialog: How to use this dialog... Now... i want to know how to use the Topen DIalog to do the following task: after myOKbutton has been pressed... i validate some data and after i want to choose a file in a specific directory... C:\DirectoryFiles\ to select a file of any type and when the user selected the file... i need the filename... I know... That TOpenDialog did a part...of this job... let the user to choose a file... but in the current directory... How tell to the TopenDIalog to open my C:\DirectoryFiles for any filetype:  C:\DirectoryFiles\*.* Thanks you ---------------------------------------------------------------------- typo · 2010-08-12 00:04 Set Filter to *.* and InitialDir to c:\etc. ---------------------------------------------------------------------- ecitoyen · 2010-08-12 00:49 Yes, your ok... the problem i got... i'm sure... was that i does not see the OpenDialog Property list... following the OpenDialog1. You're great... ---------------------------------------------------------------------- typo · 2010-08-12 01:09 Take a look at Object Inspector. ---------------------------------------------------------------------- captian jaster · 2010-08-12 01:25 And the filename.. For that Do OpenD.FileName Putting OpenD. will bring up alot of different variables\ Property's to use ---------------------------------------------------------------------- typo · 2010-08-12 01:31 Write on the MenuItem click event handler: if OpenDialog.Execute then begin    // here you can get the chosen filename, for example    Memo.Lines.LoadFromFile(OpenDialog.FileName);    // or load any other control you want end;