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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, ShellApi, Printers, RXCtrls, StdCtrls, Buttons;
type
TForm1 = class(TForm)
RxLabel1: TLabel;
RxLabel2: TLabel;
RxLabel3: TLabel;
RxLabel4: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
SpeedButton1: TSpeedButton;
function GetBios(value: integer): String;
procedure FormActivate(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{ TForm1 }
function TForm1.GetBios(value: integer): String;
begin
case value of
1: result:=String(Pchar(Ptr($FE061)));
2: result:=String(Pchar(Ptr($FE091)));
3: result:=String(Pchar(Ptr($FFFF5)));
4: result:=String(Pchar(Ptr($FEC71)));
end;
///////////////////////////////////////////////////////////////////////////////////
// {wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww //
// w (******************************************************************** w //
// w * Ptr, fonction * w //
// w * Convertit l'adresse spécifiée en pointeur. * w //
// w * Unité : System * w //
// w * Catégorie : routines d'adresses et de pointeurs * w //
// w * ------------------------------------------------- * w //
// w * function Ptr(Address: Integer): Pointer; * w //
// w * La fonction Ptr convertit l'adresse donnée en pointeur. * w //
// w * Un appel à cette fonction ne génère pas de code, mais traite * w //
// w * seulement la valeur de 32 bits donnée par Address comme * w //
// w * un pointeur. Tout comme nil, le résultat de Ptr est compatible * w //
// w * en terme d'affectation avec tous les types de pointeurs. * w //
// w ********************************************************************) w //
// wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww} //
///////////////////////////////////////////////////////////////////////////////////
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
RxLabel1.caption:=GetBios(1);
RxLabel2.caption:=GetBios(2);
RxLabel3.caption:=GetBios(3);
RxLabel4.caption:=GetBios(4);
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
close
end;
end. |
Partager