刚来上班,服务器的SQL密码竟然没人知道~~想新建个用户来着,但一想可以用工具查看客户端原先设置的*****号啊!!
网上找个工具吧...不放心.
自己写个吧.
代码也简单,
function GetText(hWndNow:Integer):String;
var
buf:Array of Char;
t:String;
i:Integer;
hLength:LongInt;
begin
hLength:=SendMessage(hWndNow,WM_GETTEXTLENGTH,0,0);
if hLength> 0 then
begin
SetLength(buf,hLength+1);
SendMessage(hWndNow,WM_GETTEXT,hLength+1,LPARAM(buf));
for i:=0 to Length(buf) do
t:=t+buf;
Result:=t;
end
else
Result:= ' ';
end;
正文完