Hm,
i tried the same with:
procedure TForm1.Button1Click(Sender: TObject);
var
Handle: THandle;
begin
Handle := FindWindow('mIRC', nil);
ShowMessage(IntToStr(Handle));
end;
and i always get the right handle, and if i switch 'mIRC' and "nil" then it doesnt show me random values, i just get 0, like i has to be. Mayb ur bug is on another place.
(Sorry for bad english

)