Dette produkt er beregnet, som et komplet "Drop-in" for den WinCrt unit, der følger med i 16-bit Delphi (Delphi 1) og Borland Pascal for Windows.
Ud over at være en komplet "drop-in" for WinCrt, er der en del udvidelser.
Længere nede på siden kan du finde hjælp til at bruge de forskellige funktioner i Win32Crt. Beskivelserne er ikke oversat til dansk.
"Win32Crt" er freeware, og grundet dette, er der ingen kildekode eller manual med i pakken. Dette skulle heller ikke være så nødvendigt, da profuktet er fuldt kompatibelt med WinCrt. Derudover er der som sagt mere hjælp at hente længere nede på siden her.
Har du programmer lavet med WinCrt, og vil du gerne have disse til at kunne kompileres i 32-bit udgaverne af Delphi, ja så er "Win32Crt" lige hvad du har brug for. "Win32Crt" er ikke beregnet til brug i Console-Mode programmer.
Inkluderet i pakken er versioner til Delphi 2,3,4,5,6,7 og 2005
Download din gratis Win32Crt her
Alle rettigheder til "Win32Crt" tilhører ZieglerSoft.
Husk vores news-server, hvor alle vore produkter kan diskuteres: news.zieglersoft.dk

Functions: Function KeyPressed: Boolean; Determines if a key on the keyboard has been pressed. Keypressed returns true if a key on the keyboard has been pressed, false otherwise. Read the key with ReadKey
Function ReadKey: Char; Reads a key from the keyboard. The char read is not echoed to the screen. If KeyPressed was true before the ReadKey function was called, the char is returned immediatly, otherwise the function will return before a key is typed. Some of the special keys on the keyboard generate extended scan-codes (That means, that ReadKey will first return a #0 char, and after that, the extended code). For a list over extended key codes that can be read with ReadKey take a look at the table here. Reading of extended key codes was not supported in the original WinCrt unit.
Function ReadBuf(Buffer: PChar; Count: Word): Word; Reads a line from the CRT window. Buffer points to a line buffer that has room for up to Count chars. Up to Count-2 chars can be entered, and an end-of-line marker (#13#10) will be appended to the line when the user presses enter. If CheckEOF is True, the input can be terminted with Ctrl+Z as well, and the line will have a end-of-file marker (#26) appended. The return value is the number of chars entered, including the end-of-file or end-of-line marker.
A small example:
program testprog;
uses Win32Crt;
Var ReadBuffer : Array [0..81] of char;
begin CheckEOF:=True; Writeln(ReadBuf(ReadBuffer,81)); Writeln(ReadBuffer); end.
Function WhereX: Integer;
Returns the X-coordinate of the current cursor location. The returned value is 1-based, and is the same as Cursor.X + 1.
Function WhereY: Integer;
Returns the Y-coordinate of the current cursor location. The returned value is 1-based, and is the same as Cursor.Y + 1.
Function SmartInput(X,Y:Integer;Len:Integer;Var Value:AnsiString;OkKeys : KeySet; TabAdvance:Boolean; AutoAdvance:Boolean): Integer;
This function reads a string from the keyboard, and return the key used to exit the procedure, as in a normal ReadKey where this is the second char returned (the first was #0) (So the char returned is the extended char eg. for PgUp, PgDn, Up and down). The reading will start at screen postion X,Y, and will allow up to Len chars to be read If TabAdvance is true, then a tab-char will return the same char as Down, and Shift+Tab will return the same code as Up. If Autoadvance is true, then if the char just entered was the last that could fit into the string, then the function returns the same code as Down The string read is returned in Value. Only chars in OKKeys will be allowed in the string. A small example:
program testprog; uses Win32Crt; Var ReadBuffer : String; begin GotoXY(10,10); ReadBuffer:=´-no name -´; Write(´Input your name:´); SmartInput(28,10,25,ReadBuffer,[´A´..´Z´,´a´..´z´,´ ´],False,False); GotoXY(1,20); Writeln(ReadBuffer); end.
Function ScreenInput(Var TheJob:Array of InputJobs):boolean; A function, that can be used to input a complete screen-full of information in one go. You make an array of InputJobs, that is filled with the wanted information, then calls this function to get the data read from the screen. If it returns False, then user exited by pressing ESC, else ENTER A small example: program Inputtest; uses Win32CRT;
Var TestB,TestA : Array[0..9] of InputJobs; Taller:Integer; Begin ShowScroll:=False; { Don´t show scrollbars } UseScrollKeys:=False; { Make sure we have control over the scrollkeys } ScrollScreen:=False; { Don´t scroll after last line } CanResize:=False; { Don´t resize the window } ClrScr; { Clear the screen } TextOutPos(10,2,´This is a small TEST-PROGRAM for ZieglerSoft´´s Win32CRT module´); TextOutPos(7,24,´Exit it with ´´ESC´´ or by going to the last field and pressing ´´Enter´´´); FillScreenChar(1,1,80,´*´); { Draw a row of starts } FillScreenChar(1,3,80,´*´); { Draw a row of starts } FillSc |