这是我以前知道了API后摸索出的第一个“程序”,2000通过,如果鼠标移过去,没有变成<br>'#'的话,点一下它就OK了<br>procedure TForm1.Timer1Timer(Sender: TObject);<br>var p:tpoint;<br>curwin:longint;<br>text:array[0..255] of Char;<br>str:string;<br>//count:integer;<br>//text1:array [0..15] of char;<br>begin<br>getcursorpos(p);<br>curwin:=windowfrompoint(p);<br>getwindowtext(curwin,text,sizeof(text));<br>str:=strpas(text);<br>edit1.text:=inttostr(p.x)+':'+inttostr(p.y)+':'+str;<br>getclassname(curwin,text,255);<br>str:=strpas(text);<br>edit5.text:=str;<br>edit4.text:=inttostr(curwin);<br>sendmessage(curwin,wm_copy,1,1);<br>{}<br>if (str='TEdit') or (str='Edit') then<br>begin<br>postmessage(curwin,em_setpasswordchar,ord('#'),0);<br>//count:=sendmessage(curwin,sb_gettext,1,lparam(@text1));<br>{postmessage(curwin,em_setpasswordchar,wparam('*'),0);}<br>//edit3.text:='';<br>//edit3.text:=inttostr(count)+':'+text1+':';<br>end;<br>end;