unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Menus, MPlayer, ExtDlgs, jpeg,Unit3,Registry;
type
TfrmPong =
class(TForm)
tmBall: TTimer;
pnlLeft: TPanel;
pnlLine: TPanel;
lblLeftPoint: TLabel;
lblRightPoint: TLabel;
pnlRight: TPanel;
mmMenu2: TMainMenu;
mmiPause: TMenuItem;
mmiSound: TMenuItem;
dlgOpen: TOpenDialog;
mpWM: TMediaPlayer;
mmiWMLied: TMenuItem;
dlgPicture: TOpenPictureDialog;
imgBall: TImage;
pnlBottom: TPanel;
pnlTop: TPanel;
mmicolor: TMenuItem;
dlgcolor2: TColorDialog;
procedure FormKeyPress(Sender: TObject;
var Key: Char);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure FormCreate(Sender: TObject);
procedure FormClick(Sender: TObject);
procedure tmBallTimer(Sender: TObject);
procedure mmiPauseClick(Sender: TObject);
procedure mmiWMLiedClick(Sender: TObject);
procedure mmicolorClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmPong: TfrmPong;
var X,Y,VX,VY:integer;
var Test:Boolean;
var FWidth,FHeight:Integer;
var Leftcolor:integer;
implementation
{$R *.DFM}
procedure TfrmPong.FormCreate(Sender: TObject);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
if reg.OpenKey('
Software\FDAC\Pong', false)
then
begin
if reg.ValueExists('
Leftcolor')
then
begin
pnlLeft.Color := reg.ReadInteger('
Leftcolor');
end;
reg.CloseKey
end;
reg.Free;
end;