to wql
attachthreadinput我实在不懂,不过自己解决了
procedure TForm1.Button1Click(Sender: TObject);
var
hedit1,hedit,hButton, hParent :THandle;
begin
hParent := FindWindow(nil,pChar('连接到 sql server'));
hedit1:= FindWindowEx(hParent,0,'edit',nil);
hedit:= FindWindowEx(hparent,hedit1,'edit',nil);
hButton:= FindWindowEx(hParent,0,nil,'确定');
SendMessage(hedit,WM_SETTEXT,0,LongInt(Pchar('密码')));
sendMessage(hButton,BM_CLICK,0,0);
end;
能告诉我attachthreadinput是怎么回事吗?如果嫌麻烦也可以不回答,总之分一定要送的,再次谢谢了!!!!