Problem with cmFileOpen and StdDlg lazarus / 65-FV-Textmode IDE ---------------------------------------------------------------------- vitaly_t · 2016-12-13 22:01 There is procedure uses ... StdDlg ... ; Procedure FileOpen; var  PF: PFileDialog;                       Control: Word;  s: PathStr; begin  New(PF, Init('*.dat','Select file:','File name',fdOpenButton,0));  Control:= DeskTop^.ExecView(PF);                                         case Control of                                                              StdDlg.cmFileOpen, cmOk:    begin                                          PF^.GetFileName(s) ;               end;  end;  Dispose (PF, Done) end; So I have error message ... lab1.pas(24,10) Error: Identifier not found "cmFileOpen" ... In TV it is work. Anybody can help me solve the problem? ---------------------------------------------------------------------- marcov · 2016-12-13 22:18 In FV it is in "fvconsts" ---------------------------------------------------------------------- vitaly_t · 2016-12-14 06:19 Quote from: marcov on December 13, 2016, 11:18:51 pmIn FV it is in "fvconsts" Could you please explain some more. Do you mean add FVConsts in uses ? I add the module but error doesn't disappear. ---------------------------------------------------------------------- molly · 2016-12-14 06:34 Quote from: vitaly_t on December 14, 2016, 07:19:58 amI add the module but error doesn't disappear. Well, that isn't too strange considering that you explicitly reference it to be part of unit StdDlg Quote from: vitaly_t on December 13, 2016, 11:01:10 pm  StdDlg.cmFileOpen, cmOk: Remove that part or replace it with unit name FVConsts instead. ---------------------------------------------------------------------- vitaly_t · 2016-12-14 06:46 Quote from: molly on December 14, 2016, 07:34:25 amQuote from: vitaly_t on December 14, 2016, 07:19:58 amI add the module but error doesn't disappear. Well, that isn't too strange considering that you explicitly reference it to be part of unit StdDlg Quote from: vitaly_t on December 13, 2016, 11:01:10 pm  StdDlg.cmFileOpen, cmOk: Remove that part or replace it with unit name FVConsts instead. Yes. It's strange. In source I can see cmFileOpen is StdDlg unit. But you advice about FVConsts instead StdDlg is helpfull.  Thank you very much. ---------------------------------------------------------------------- molly · 2016-12-14 07:04 Quote from: vitaly_t on December 14, 2016, 07:46:00 amYes. It's strange. In source I can see cmFileOpen is StdDlg unit. Free Pascal's Free Vision has that identifier declared inside unit FVConsts, so you would need that unit in order to be able to use the cmFileOpen constant. I don't understand what is strange about that ... please elaborate in case you still have questions