Hallo Leute
vielen Dank .. funktioniert jetzt einwandfrei ...
Delphi-Quellcode:
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
Shift: TShiftState);
var
FService : IFMXVirtualKeyboardService;
begin
if (Key = vkHardwareBack) or (Key = vkHome) then begin
TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(FService));
if (FService <> nil) and (TVirtualKeyboardState.Visible in FService.VirtualKeyBoardState) then
begin
// Tastatur ist eingeblendet .. also nix tun
end
else
begin
Key := 0;
if (maincontrol.ActiveTab <> menu) AND (maincontrol.ActiveTab <> menu2) AND (maincontrol.ActiveTab <> login) AND (maincontrol.ActiveTab <> login2) then
begin
if ausrichtung='hoch' then maincontrol.ActiveTab:=menu;
if ausrichtung='quer' then maincontrol.ActiveTab:=menu2;
end
else
begin
if (maincontrol.ActiveTab = menu) OR (maincontrol.ActiveTab = menu2) then
begin
if ausrichtung='hoch' then maincontrol.ActiveTab:=login;
if ausrichtung='quer' then maincontrol.ActiveTab:=login2;
end
else
begin
MessageDlg('Programm beenden?', TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbOK, TMsgDlgBtn.mbCancel], -1, OnCloseDialog);
end;
end;
end;
Exit;
end;
if Key = sgiUpRightLong then begin // Menu button pressed ?
if ausrichtung='hoch' then maincontrol.ActiveTab:=menu;
if ausrichtung='quer' then maincontrol.ActiveTab:=menu2;
end;
end;
procedure TForm1.OnCloseDialog(Sender: TObject; const AResult: TModalResult);
begin
if AResult = mrOK then begin
Close;
end;
end;
Erich Wanker - for life:=1971 to lebensende do begin ..
O
/H\
/ \