unit Principal;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, ComCtrls;

type
  TF_Principal = class(TForm)
    MainMenu1: TMainMenu;
    Cadastros1: TMenuItem;
    Clientes1: TMenuItem;
    Cadastro1: TMenuItem;
    IntegraoXGruposXTarifas1: TMenuItem;
    ClientesXGruposXTarifas1: TMenuItem;
    Extratos1: TMenuItem;
    Grupos1: TMenuItem;
    arifas1: TMenuItem;
    Setores1: TMenuItem;
    N1: TMenuItem;
    Sair1: TMenuItem;
    Consultas1: TMenuItem;
    Clientes2: TMenuItem;
    arifas2: TMenuItem;
    arifas3: TMenuItem;
    Setores2: TMenuItem;
    itulos1: TMenuItem;
    itulos2: TMenuItem;
    Abertos1: TMenuItem;
    BaixadeTitulosAbertos1: TMenuItem;
    Relatorios1: TMenuItem;
    Utilitarios1: TMenuItem;
    Segurana1: TMenuItem;
    Usuarios1: TMenuItem;
    Cadastro2: TMenuItem;
    StatusBar1: TStatusBar;
    procedure Sair1Click(Sender: TObject);
    procedure Cadastro1Click(Sender: TObject);
    procedure ProcessaMsg(Var Msg:TMsg;Var handled:Boolean);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_Principal: TF_Principal;

implementation

uses Cliente, CadCliente;

{$R *.dfm}

procedure TF_Principal.Sair1Click(Sender: TObject);
begin
Application.Terminate;
end;

procedure TF_Principal.Cadastro1Click(Sender: TObject);
begin
Application.CreateForm(TF_CadCliente,F_CadCliente);
F_CadCliente.Showmodal;
F_CadCliente.Free;
end;

procedure TF_Principal.ProcessaMsg(var Msg: TMsg; var handled: Boolean);
begin
if Msg.message=WM_KEYDOWN then
begin
if Msg.wParam=VK_RETURN then
Keybd_event(VK_TAB,0,0,0);
end;
end;

procedure TF_Principal.FormCreate(Sender: TObject);
begin
APPLICATION.ONMESSAGE := ProcessaMsg;
end;

end.
