This repository has been archived by the owner on May 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuFrmDlgLocalidad.pas.cbk
144 lines (127 loc) · 3.47 KB
/
uFrmDlgLocalidad.pas.cbk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
unit uFrmDlgLocalidad;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, UFrmPlantillaDlg, DB, StdCtrls, Buttons, ComCtrls, Mask, DBCtrls;
type
TFrmDlgLocalidad = class(TFrmPlantillaDlg)
Label1: TLabel;
DBEdit1: TDBEdit;
DataSource1: TDataSource;
Label2: TLabel;
DBEdit2: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
Label4: TLabel;
DBEdit4: TDBEdit;
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DBEdit3KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DBEdit4KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure DBEdit2ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
procedure DBEdit3ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
procedure DBEdit4ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmDlgLocalidad: TFrmDlgLocalidad;
implementation
uses
UDMDatos,Clipbrd;
{$R *.dfm}
procedure TFrmDlgLocalidad.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key = #13 then
BitBtnGrabar.Click
else
if (Upcase(Key) in['0'..'9']) then
begin
Key:= #0;
//MessageBeep(MB_ICONERROR);
end;
end;
procedure TFrmDlgLocalidad.DBEdit3KeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key = #13 then
BitBtnGrabar.Click
else
if (Upcase(Key) in['0'..'9']) then
begin
Key:= #0;
//MessageBeep(MB_ICONERROR);
end;
end;
procedure TFrmDlgLocalidad.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if not(Upcase(Key) in[#8,'0'..'9']) then
begin
Key:= #0;
//MessageBeep(MB_ICONERROR);
end;
end;
procedure TFrmDlgLocalidad.DBEdit2KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
inherited;
if ((ssCtrl in Shift) AND (Key = ord('V'))) or ((ssShift in Shift) and (Key = VK_INSERT)) then
begin
if Clipboard.HasFormat(CF_TEXT) then
ClipBoard.Clear;
Key := 0;
end;
end;
procedure TFrmDlgLocalidad.DBEdit3KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
inherited;
if ((ssCtrl in Shift) AND (Key = ord('V'))) or ((ssShift in Shift) and (Key = VK_INSERT)) then
begin
if Clipboard.HasFormat(CF_TEXT) then
ClipBoard.Clear;
Key := 0;
end;
end;
procedure TFrmDlgLocalidad.DBEdit4KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
inherited;
if ((ssCtrl in Shift) AND (Key = ord('V'))) or ((ssShift in Shift) and (Key = VK_INSERT)) then
begin
if Clipboard.HasFormat(CF_TEXT) then
ClipBoard.Clear;
Key := 0;
end;
end;
procedure TFrmDlgLocalidad.DBEdit2ContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
begin
inherited;
Handled := True;
end;
procedure TFrmDlgLocalidad.DBEdit3ContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
begin
inherited;
Handled := True;
end;
procedure TFrmDlgLocalidad.DBEdit4ContextPopup(Sender: TObject;
MousePos: TPoint; var Handled: Boolean);
begin
inherited;
Handled := True;
end;
end.