Autor Beitrag
g1o2k4
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 493



BeitragVerfasst: So 23.03.08 00:05 
hi

ich suche den char bzw die systemkonstante für den links/rechtskey...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.KeyPress(Sender: TObject; var Key: Char);
begin
  if Key = 'Links/Rechtsraste' then // gesucht
  begin
  end;
end;


bis jetzt bin ich nirgendwo fündig geworden.

und noch eine frage direkt hinterher:
rechnen die trigonometrischen funktionen aus der math unit mit bogen- oder gradmaß ?
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: So 23.03.08 00:53 
Hi,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.KeyPress(Sender: TObject; var Key: Char);
begin
  if (Key = Char(vk_Left)) or (Key = Char(vk_Right)) then // gesucht
  begin

  end;
end;


Zu 2): Bogenmaß. Bitte erstelle in Zukunft für jedes Thema einen neuen Tread(hier finde ich es jetzt lächerlich, aber grundlegend gilt das schon).
mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
g1o2k4 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 493



BeitragVerfasst: So 23.03.08 01:22 
1. danke. klappt.

2. ja das dachte ich mir auch ^^
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: So 23.03.08 12:29 
@2.: Es gibt aber eine Funktion DegToRad und umgekehrt, die machen aber nichts anderes als * PI / 180 bzw. umgekehrt, ist nur leserlicher, weil man direkt weiß, was gemeint ist(sollte man aber auch so^^). Ein bisschen kürzer wird der Code dadurch auch(so 'nen Millimeter aber das hat mir schonmal nen Zeilenumbruch erspart^^).

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: So 23.03.08 12:37 
user profile iconHidden hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.KeyPress(Sender: TObject; var Key: Char);
begin
  if (Key = Char(vk_Left)) or (Key = Char(vk_Right)) then // gesucht
  begin

  end;
end;

So wär es schöner:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.KeyPress(Sender: TObject; var Key: Char);
begin
  if Ord(Key) in [vk_Left, vk_Right] then
  begin

  end;
end;
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: So 23.03.08 13:38 
Jo, wahrscheinlich werden die Keys aber getrennt behandelt. Wenn du viele behandelst, würde ich dir eine case-Anweisung empfehlen

mfG,

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)