请问如何解决我调用外部的程序的窗体置顶的问题????
我希望打开'd:\playcap.exe'外部可执行文件,并让它一直在顶部显示。我如下操作
ShellExecute(Handle,'open',PChar('d:\playcap.exe'),nil,nil,SW_SHOW);
f:=findwindow(nil,'video capture previewer');
if not f=0 then
begin
a:=setwindowpos(f,HWND_TOP,10,10,50,50,SWP_NOZORDER);
if a then
showmessage('set ok')
else showmessage('set false');
end;
但是setwindowpos(f,HWND_TOP,10,10,50,50,SWP_NOZORDER);语句一直不执行,不知道为什么??
我的API函数有用错吗?还有其他的方法吗?SWP_NOZORDER设置是否正确呢???
急!!!