1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28:
| program AOT; uses Windows, shellapi, Forms;
var W:Hwnd; i:integer; begin i:=0; shellexecute(0,'','swhx','','',SW_SHOW); W:=FindWindow('SWHXWindow','Trölfdesign Terminkalender 1.0'); while (W=0)and(i<50)do begin W:=FindWindow('SWHXWindow','Trölfdesign Terminkalender 1.0'); inc(i); Sleep(200); end; if W<>0 then begin ShowWindow(W,SW_HIDE); SetWindowLong(W,GWL_EXSTYLE,GetWindowLong(W,GWL_EXSTYLE) or WS_EX_PALETTEWINDOW and not WS_EX_APPWINDOW); ShowWindow(W,SW_SHOW); SetWindowPos(W, HWND_TOPMOST, 0 , 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE); end end. |