1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| procedure TFrmShow.SilentMsgBox();
var
lpClassName: PChar; // pointer to class name
lpWindowName: PChar; // pointer to window name
HwndParent: HWND;
const
MsIE = 'Microsoft Internet Explorer';
begin
try
lpClassName := nil; //'#32770';, // pointer to class name
lpWindowName := MsIE; // pointer to window name
{Récupère le handle de la boite de dialogue}
HwndParent := FindWindow(lpClassName, lpWindowName);
if HwndParent <> 0 then begin
SendMessage(HwndParent, WM_CLOSE, 0, 0);
FichierLog('System', 'MessageBox', MsIE);
end;
except
FichierLog('System', 'Except', Exception(ExceptObject()).Message);
end;
end; |
Partager