karamofweb
17-01-2011, 04:00 PM
السلام عليكم، برنامجنا واضخ من عنوانه ، وان تعذر الفهم فنحن هنا ان شاء الله ... تفضلوا السورس و البرنامج في المرفقات
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Timer1: TTimer;
Panel1: TPanel;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
var
rc : hwnd;
rcDc : HDC;
P : TPoint;
begin
GetCursorPos(P);
rc := WindowFromPoint(P);
rcDc := GetDc(rc);
panel1.Color := GetPixel(rcDc,p.x,p.y);
end;
end.
تفظلوا
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Timer1: TTimer;
Panel1: TPanel;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
var
rc : hwnd;
rcDc : HDC;
P : TPoint;
begin
GetCursorPos(P);
rc := WindowFromPoint(P);
rcDc := GetDc(rc);
panel1.Color := GetPixel(rcDc,p.x,p.y);
end;
end.
تفظلوا