Autor Beitrag
Coder84
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 26



BeitragVerfasst: Fr 09.01.04 02:27 
Um eine Konsolenanwenung warten zu lassen bis eine beliebige Taste gedrückt wurde, konnte man unter Turbo Pascal schreiben:

ausblenden Delphi-Quelltext
1:
repeat until keypressed;					


Soetwas in der Art brauch ich jetzt in einer Delphi-Consolenanwendung.
Weiss jemand wie's geht ?

Ich bedanke mich schon im voraus.

Moderiert von user profile iconPeter Lustig: Topic Verschoben
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Fr 09.01.04 07:14 
Hi,

Hier findest du viele Funktionen*) für eine Consolen Anwendnung,
unter anderem auch eine KeyPressed Funktion.

*)
ausblenden volle Höhe Delphi-Quelltext
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:
procedure AssignCrt(var F: Text); 
function KeyPressed: Boolean; 
function ReadKey: char; 
procedure TextMode(Mode: Integer); 
procedure Window(X1, Y1, X2, Y2: Byte); 
procedure GotoXY(X, Y: Byte); 
function WhereX: Byte; 
function WhereY: Byte; 
procedure ClrScr; 
procedure ClrEol; 
procedure InsLine; 
procedure DelLine; 
procedure TextColor(Color: Byte); 
procedure TextBackground(Color: Byte); 
procedure LowVideo; 
procedure HighVideo; 
procedure NormVideo; 
procedure Delay(MS: Word); 
procedure Sound(Hz: Word); 
procedure NoSound; 
{ New functions & procedures there are not in original CRT unit } 
procedure FillerScreen(FillChar: Char); 
procedure FlushInputBuffer; 
function GetCursor: Word; 
procedure SetCursor(NewCursor: Word); 
function MouseKeyPressed: Boolean; 
procedure MouseGotoXY(X, Y: Integer); 
function MouseWhereY: Integer; 
function MouseWhereX: Integer; 
procedure MouseShowCursor; 
procedure MouseHideCursor; 
{ These functions & procedures are for inside use only } 
function MouseReset: Boolean; 
procedure WriteChrXY(X, Y: Byte; Chr: char); 
procedure WriteStrXY(X, Y: Byte; Str: PChar; dwSize: Integer); 
procedure OverwriteChrXY(X, Y: Byte; Chr: char);
Coder84 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 26



BeitragVerfasst: Fr 09.01.04 14:10 
im SwissCenter hab ich zwar bisher eigendlich nur gutes gesehen, aber die Keypressed function funktioniert nicht. Da wird das
repeat until keypressed; zur Endlosschleife