ar
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
query1.append;
dbedit1.setFocus;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
query1.post;
end;
procedure TForm1.AdvGlowButton1Click(Sender: TObject);
begin
query1.delete;
vrblinkled1.ColorIndex:=1;
label11.caption:='
Datensatz wurde gelöscht';
end;
procedure TForm1.AdvGlowButton2Click(Sender: TObject);
begin
query1.first;
end;
procedure TForm1.AdvGlowButton3Click(Sender: TObject);
begin
query1.next;
end;
procedure TForm1.Query1BeforeDelete(DataSet: TDataSet);
begin
if (MessageBox(0, '
Datensatz wirklich löschen!', '
Löschen', MB_ICONQUESTION
or
MB_YESNO
or MB_DEFBUTTON2) = idNO)
then
begin
Abort;
end;
end;
procedure TForm1.FormKeyDown(Sender: TObject;
var Key: Word;
Shift: TShiftState);
begin
if key = VK_ESCAPE
then Close;
end;
procedure TForm1.AdvGlowButton4Click(Sender: TObject);
begin
query1.append;
vrblinkled1.ColorIndex:=3;
label11.caption:='
Online';
end;
procedure TForm1.AdvGlowButton5Click(Sender: TObject);
begin
query1.post;
vrblinkled1.ColorIndex:=4;
label11.caption:='
Daten gespeichert';
end;
procedure TForm1.AdvGlowButton6Click(Sender: TObject);
begin
query1.last;
end;
procedure TForm1.AdvGlowButton7Click(Sender: TObject);
begin
query1.prior;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// ohne Titelleiste
SetWindowLong(
Handle,GWL_STYLE, GetWindowLong(
Handle, GWL_STYLE)
and not WS_CAPTION);
//ClientHeight:= Height;
//WindowState := wsMaximized;
vrblinkled1.EnableBlinking:=true;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
label11.Caption := '
Offline';
end;
procedure TForm1.FormKeyPress(Sender: TObject;
var Key: Char);
begin
if Key = #13
then
begin
Key := #0;
if GetKeyState(VK_Shift)
and $8000 <> 0
then PostMessage(
Handle, WM_NextDlgCtl, 1, 0)
else PostMessage(
Handle, WM_NextDlgCtl, 0, 0)
end;
end;
end.