一旦显示窗口,是否可以检测到鼠标按钮是否已被按下?
procedure TForm1.FormShow(Sender: TObject); begin if GetKeyState(VK_LBUTTON) and $8000 <> 0 then ShowMessage('Left mouse button is pressed...') else ShowMessage('Left mouse button is not pressed...') end;