S
sy0116
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);<br> var<br>hwnd,h:longint;<br>begin<br>hwnd:=FindWindow(nil,pchar('form1'));<br>h:=FindWindowEx(hwnd,0,nil,pchar('button1'));//&sup2;é&iquest;&acute;API&ordm;&macr;&Ecirc;&yacute;°&iuml;&Ouml;ú&Icirc;&Auml;&frac14;&thorn;<br>edit1.Text:=inttostr(h);<br>edit2.text:=inttostr(Button1.handle);<br>end;<br>输入完后按F5键可以执行,但只要保存后再运行就有错误了,按F5时hwnd:=FindWindow(nil,pchar('form1'));这一行变成红色光标在nil前闪动。提示;<br>[Error] findwindow.pas(32): '.' expected but '(' found<br>[Fatal Error] findw.dpr(5): Could not compile used unit 'findwindow.pas'<br>把nil换成TForm1也没用