Pegar de Clipboard a StringGrid
var
Vtextbuf:string;
Vnren:integer;
columna:integer;
begin
if Clipboard.HasFormat(CF_TEXT) then
begin
Vtextbuf:= Clipboard.AsText;
Vnren:=1;
stringgrid1.RowCount:=2;
columna:=strtoint(edit1.text);
while (pos(#13,Vtextbuf)>0)and(length(Vtextbuf)>2) do
begin
stringgrid1.Cells[Columna,Vnren]:=copy(Vtextbuf,1,pos(#13,Vtextbuf)-1);
delete(Vtextbuf,1,pos(#13#10,Vtextbuf)+1);
if (length(Vtextbuf)>2) then
begin
stringgrid1.RowCount:=stringgrid1.RowCount+1;
Vnren:=Vnren+1;
end;
// ShowMessage(Vtextbuf);
end;
bt_validar.Click;
end
else
ShowMessage('No hay texto en el PortaPapeles');
Este Codigo me entrega lo copiado pero no el ultimo valor que puede ser?
|