procedure TCursorOper.Timer1Timer(Sender: TObject);<br>var<br> p:TPoint;<br> hand:hwnd;<br> str:Array[0..255] of char;<br> strclass:Array[0..255] of char;<br>begin<br> timer1.Enabled:=false;<br> GetCursorPos(p);<br> if (p.X>=CursorOper.Left) and (p.X<=CursorOper.Left+CursorOper.Width)<br> and (p.Y>=CursorOper.Top) and (p.Y<=CursorOper.Top+CursorOper.Height) then<br> begin<br> CursorStatus.Panels[0].Text:='在本窗体内';<br> end else<br> begin<br> CursorStatus.Panels[0].Text:='在本窗体外';<br> hand:=WindowFromPoint(p);<br><br> if anEnabled.Checked then EnumChildWindows(hand, @WindowEnabled, 0);<br> if Not anEnabled.Checked then EnumChildWindows(hand, @WindowDisEnabled, 0);<br> if anShow.Checked then EnumChildWindows(hand, @WindowShow, 0);<br> if Not anShow.Checked then EnumChildWindows(hand, @WindowHide, 0);<br><br> getwindowtext(hand,@str,length(str));<br> getclassname(hand,@strclass,length(str));<br> if CheckHand=hand then<br> begin<br> if i>=15 then<br> begin<br> AddANXinXi(inttostr(hand),str,strclass);<br> i:=0;<br> end else<br> begin<br> i:=i+1;<br> end;<br> end;<br> JuBing.Text:= inttostr(hand);<br> NeiRong.Text:=str;<br> LeiMing.Text:=strclass;<br> ShuBiao_X.Caption:=IntToStr(p.X);<br> ShuBiao_Y.Caption:=IntToStr(p.Y);<br> CheckHand:=hand;<br> end;<br> timer1.Enabled:=true;<br>end;