procedure TForm1.Button2Click(Sender: TObject); var h:hwnd; begin h:=findwindow(nil,pchar('d:\abc.exe'); if h<>0 then begin windows.SetParent(h,form1.Panel1.Handle); end; end; 给分吧!!!!!
to:l0f(凌风) 谢谢。分肯定是你的了。只是还有一个问题。如何将标题栏隐掉我的代码: WinExec('D:abc.exe',0); HWnd := FindWindow(nil, 'abc'); if HWnd <> 0 then begin Windows.SetParent(HWnd, Panel1.Handle); SetWindowPos(Hwnd, 0, 0, 0, Panel1.ClientWidth, Panel1.ClientHeight, 0); end;
var h:hwnd; begin h:=findwindow(nil,'form1'); showmessage(inttostr(h)); SetWindowLong(h,GWL_STYLE,GetWindowLong(h,GWL_STYLE)//关键就是这个函数! and not WS_CAPTION); end;
看看这个吧
var h:hwnd;
begin
h:=findwindow(nil,pchar('d:\abc.exe');
if h<>0 then
begin
windows.SetParent(h,form1.Panel1.Handle);
end;
end;
给分吧!!!!!
谢谢。分肯定是你的了。只是还有一个问题。如何将标题栏隐掉我的代码:
WinExec('D:abc.exe',0);
HWnd := FindWindow(nil, 'abc');
if HWnd <> 0 then
begin
Windows.SetParent(HWnd, Panel1.Handle);
SetWindowPos(Hwnd, 0, 0, 0, Panel1.ClientWidth, Panel1.ClientHeight, 0);
end;
begin
h:=findwindow(nil,'form1');
showmessage(inttostr(h));
SetWindowLong(h,GWL_STYLE,GetWindowLong(h,GWL_STYLE)//关键就是这个函数!
and not WS_CAPTION);
end;
把自己的EXE放到自己的界面上,就是程序的高级编写
把别人的程序加载到自己的界面上就是剽窃上面的代码无法执行啊。
HWnd能够直接被赋值??????????