Как определить нажатие PrintScreen
|
type TForm1 = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject); private { Private declarations } procedure AppIdle(Sender: TObject; var Done: Boolean); public { Public declarations } end; var Form1: TForm1; *.DFM} procedure TForm1.FormCreate(Sender: TObject); begin Application.OnIdle := AppIdle; end; procedure TForm1.AppIdle(Sender: TObject; var Done: Boolean); begin if GetAsyncKeyState(VK_SNAPSHOT) <> 0 then Form1.Caption := 'SnapShot'; Done := True; end; |