anchor.diff:    AStateText:= '';
   
     F:= TForm.Create(nil);
  -  F.BorderStyle:= bsDialog;
  -  F.Position:= poDesktopCenter;
  -  F.Width:= ASizeX;
  -  F.Height:= ASizeY;
  -  F.Caption:= ATitle;
  +  try
  +    F.BorderStyle:= bsDialog;
  +    F.Position:= poDesktopCenter;
  +    F.Width:= ASizeX;
  +    F.Height:= ASizeY;
  +    F.Caption:= ATitle;
   
  -  NIndex:= 0;
  -  repeat
  -    SItem:= SGetItem(AText, #10);
  -    if SItem='' then break;
  -    DoAddControl(F, SItem, NIndex);
  -    Inc(NIndex);
  -  until false;
  +    NIndex:= 0;
  +    repeat
  +      SItem:= SGetItem(AText, #10);
  +      if SItem='' then break;
  +      DoAddControl(F, SItem, NIndex);
  +      Inc(NIndex);
  +    until false;
   
  -  if (AFocusedIndex>=0) and (AFocusedIndex<F.ControlCount) then
  -    F.ActiveControl:= F.Controls[AFocusedIndex] as TWinControl;
  +    if (AFocusedIndex>=0) and (AFocusedIndex<F.ControlCount) then
  +      F.ActiveControl:= F.Controls[AFocusedIndex] as TWinControl;
   
  -  Res:= F.ShowModal;
  -  if Res>=cButtonResultStart then
  -  begin
  -    AButtonIndex:= Res-cButtonResultStart;
  +    Res:= F.ShowModal;
  +    if Res>=cButtonResultStart then
  +    begin
  +      AButtonIndex:= Res-cButtonResultStart;
  +      AStateText:= DoGetFormResult(F);
  +    end;
  +  finally
  +    FreeAndNil(F);
     end;
   end;
   
  
positive.code: const
    cButtonResultStart=100;
  
  procedure DoAddControl(AForm: TForm; AItems: string; AControlIndex: integer);
  var
    SNameValue, SName, SValue, SListItem: string;
  
negative.code:       repeat
          SListItem:= SGetItem(SValue, #9);
          if SListItem='' then break;
          if Ctl is TListbox then (Ctl as TListbox).Items.Add(SListItem);
          if Ctl is TComboBox then (Ctl as TComboBox).Items.Add(SListItem);
        until false;
        Continue;
      end;
  