首页  编辑  

取得当前光标处的颜色

Tags: /超级猛料/Picture.图形图像编程/颜色处理/   Date Created:

]、。·ˉˇ¨〃々—~‖…’”〕〉》」』〗】∶!"'),.:;?]` procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;

Shift: TShiftState);

var

DC:HDC;

X,Y:Integer;

begin

X:=Mouse.CursorPos.X;

Y:=Mouse.CursorPos.Y;

if Key<>VK_Return then Exit;

DC:=GetDC(0);

Color:=GetPixel(DC,X,Y);

end;