Skip to content

Instantly share code, notes, and snippets.

Created August 8, 2013 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6187160 to your computer and use it in GitHub Desktop.
Save anonymous/6187160 to your computer and use it in GitHub Desktop.
ver ficha de programa de Gestión desde 0
unit Uvercontactos;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, MyDbIbMemo, DB, Mask, DBCtrls, Buttons, ExtCtrls;
type
TFverContactos = class(TForm)
Panel1: TPanel;
SB_Salir: TSpeedButton;
Label1: TLabel;
DBEdit1: TDBEdit;
DataSource1: TDataSource;
Label2: TLabel;
DBEdit2: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
Label4: TLabel;
DBEdit4: TDBEdit;
Label5: TLabel;
DBEdit5: TDBEdit;
Label6: TLabel;
DBEdit6: TDBEdit;
Label7: TLabel;
DBEdit7: TDBEdit;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
Label10: TLabel;
DBEdit10: TDBEdit;
Label11: TLabel;
DBIBMemo1: TDBIBMemo;
procedure SB_SalirClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FverContactos: TFverContactos;
implementation
{$R *.dfm}
procedure TFverContactos.FormKeyPress(Sender: TObject; var Key: Char);
//------------------------------------------------------------------------------
//************************************************[ Al pulsar una tecla ]******
// Al pulsar la tecla salta al foco del siguiente componente, si esta admitido
//------------------------------------------------------------------------------
begin
if (Key = #13) then {Si se ha pulsado enter }
if (ActiveControl is TEdit)
or (ActiveControl is TDBEdit)
or (ActiveControl is TDBComboBox) then
begin
Key := #0; { anula la pulsación }
Perform(WM_NEXTDLGCTL, 0, 0); { mueve al próximo control }
end
end;
procedure TFverContactos.SB_SalirClick(Sender: TObject);
//------------------------------------------------------------------------------
//*****************************************************************[ Salir ]****
//------------------------------------------------------------------------------
begin
Close;
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment