📄 lc_bcb_72.txt
字号:
检测鼠标位置
检 测 鼠 标 位 置
例如,通过一个定时器Timer1的触发事件源来检测鼠标位置
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
TPoint pt;
GetCursorPos(&pt);
Label1->Caption = "("
+IntToStr(pt.x) +")(" +IntToStr(pt.y) +")";
}