unit Tipinve;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  StdCtrls, ExtCtrls, Buttons;

type
  TFormaTipoInventario = class(TForm)
    RadioButton2: TRadioButton;
    RadioButton1: TRadioButton;
    RadioButton3: TRadioButton;
    Aceptar: TBitBtn;
    Shape1: TShape;
    Panel1: TPanel;
    Bevel2: TBevel;
    Bevel3: TBevel;
    Bevel4: TBevel;
    Panel2: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    procedure FormDblClick(Sender: TObject);
    procedure Panel2Click(Sender: TObject);
    procedure RadioButton1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure RadioButton2KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure RadioButton3KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure AceptarKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure Label2MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormaTipoInventario: TFormaTipoInventario;

implementation

uses Inven;

{$R *.DFM}

procedure ponedatos;
begin

with FormaTipoInventario do
begin
if RadioButton1.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton1.Caption;
if RadioButton2.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton2.Caption;
if RadioButton3.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton3.Caption;
FormaTipoInventario.Close;
end;

end;


procedure TFormaTipoInventario.FormDblClick(Sender: TObject);
begin
if RadioButton1.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton1.Caption;
if RadioButton2.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton2.Caption;
if RadioButton3.Checked then
FormaInventario.EditTICOS_I.Text:=RadioButton3.Caption;
FormaTipoInventario.Close;
end;


procedure TFormaTipoInventario.Panel2Click(Sender: TObject);
begin
ponedatos;
Close;
end;

procedure TFormaTipoInventario.RadioButton1KeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
if key=13 then
begin
ponedatos;
end;
end;

procedure TFormaTipoInventario.RadioButton2KeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
if key=13 then
begin
ponedatos;
end;
end;

procedure TFormaTipoInventario.RadioButton3KeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
if key=13 then
begin
ponedatos;
end;
end;

procedure TFormaTipoInventario.AceptarKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
if key=13 then
begin
ponedatos;
end;
end;

procedure TFormaTipoInventario.Panel1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(FormaTipoInventario.Handle, WM_SYSCOMMAND, $F012, 0);
end;

procedure TFormaTipoInventario.Label2MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(FormaTipoInventario.Handle, WM_SYSCOMMAND, $F012, 0);
end;

end.
