Hi
Actually I just checked your file. If you examine it at runtime in the IDE you will see that it contains null characters (#0).
Try this:
function RemoveNullCharacters(const s: String): string;
var
i: Integer;
begin
Result := s;
i := 1;
while i < Length(Result) do
if Result[i] = #0 then
Delete(Result, i, 1)
else
Inc(i);
end;
procedure TMainForm.ImageEnView1Click(Sender: TObject);
begin
Edit1.text := RemoveNullCharacters(StringGrid1.Cells[1, 42]);
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com