Ver Mensaje Individual
  #3  
Antiguo 28-08-2011
trex2000 trex2000 is offline
Miembro
 
Registrado: may 2003
Posts: 240
Reputación: 22
trex2000 Va por buen camino
Gracias por la respuesta el codigo que utilizo en ese boton es el siguente:
Código Delphi [-]
procedure TFMov.CoolBtn_PesoClick(Sender: TObject);
Var
  I, G, L,iRenglonTerminal : Integer;
  sValRen, sCaracter, sPeso : String;
begin
  L:=1;
  If Not ApdComport1.Open Then
   ApdComport1.Open := True;
  AdTerminal1.Clear;
  AdTerminal1.ClearAll;
  ApdComport1.Output := 'P';
  I:=sGridMovtos.RowCount-1;
  iRenglonTerminal := 1;
  sValRen := AdTerminal1.Line[iRenglonTerminal];

  CoolLabel20.Caption := Trim(AdTerminal1.Line[0]);

    Application.ProcessMessages;

    If CoolLabel20.Caption <> '' Then
     Begin
      sGridMovtos.Cells[0,I]:=IntToStr(I);//Ticket
      sGridMovtos.Cells[1,I]:=txtbtn_CodProd.Text;//Codigo del producto
      sGridMovtos.Cells[2,I]:=coolLabel20.caption;//Peso Bruto
      sGridMovtos.Cells[3,I]:=IntToStr(0);//Tara
      sGridMovtos.Cells[4,I]:=coollabel20.caption;//Peso Neto
      sGridMovtos.Cells[5,I]:=IntToStr(txtLoteNumJul.AsInteger);//Lote
      sGridMovtos.Cells[6,I]:=IntToStr(txtTarima.AsInteger);//Tarima
      sGridMovtos.RowCount:=(sGridMovtos.RowCount+1);

     End
    Else
     ShowMessage('HAY UN ERRROR');

end;

Espero me puedan ayudar.

De antemano muchas gracias.
Responder Con Cita