var h: HWND; begin h := FindWindow(nil,'计算器'); SetWindowLong(h,GWL_HWNDPARENT,WS_EX_TOOLWINDOW); end;
因为还有个application的句柄var h: THandle; begin //隐藏窗口 h := FindWindow('TfrmUI2', 'frmUI2'); if h <> 0 then ShowWindow(h, SW_HIDE); //隐藏application,prj是任务栏上面显示的名字 h := FindWindow('TApplication', 'prj'); if h <> 0 then ShowWindow(h, SW_HIDE);
h: HWND;
begin
h := FindWindow(nil,'计算器');
SetWindowLong(h,GWL_HWNDPARENT,WS_EX_TOOLWINDOW);
end;
h: THandle;
begin
//隐藏窗口
h := FindWindow('TfrmUI2', 'frmUI2');
if h <> 0 then
ShowWindow(h, SW_HIDE);
//隐藏application,prj是任务栏上面显示的名字
h := FindWindow('TApplication', 'prj');
if h <> 0 then
ShowWindow(h, SW_HIDE);