Arsip: Menutup Aplikasi Internet Explorer


by LuriDarmawan in Internet more 18 years ago 2881
Beberapa rekan mungkin ingin membuat aplikasi yang melarang user membuka browser 'Internet Explorer', boleh boleh saja... dipersilahkan..
tapi masalahnya, bagaimana caranya?
Ini dia sedikit source-nya
program Sample;
function CloseIEs(Wnd : HWnd; Form : TForm1) : Boolean; export; stdcall;
var
sCap : array [0..255] of char;
begin
GetWindowText (Wnd, sCap, sizeof(sCap));
if pos ('Microsoft Internet Explorer', sCap) > 0 then
begin
PostMessage (Wnd, WM_CLOSE, 0, 0);
end
else
begin
// check by class name!
  GetClassName (Wnd, sCap, sizeof(sCap));
if sCap = 'IEFrame' then
PostMessage (Wnd, WM_CLOSE, 0, 0);
end;
CloseIEs := true; { next window, please }
end;
begin
// close all hidden instances
  EnumWindows(@CloseIEs, 0);
end.
Syntax Highlighted with https://pascal-id.org/syntax


Selamat mencoba.

referensi:
http://www.delphifaq.com/faq/f147.shtml

Coinfest

Pascal Indonesia is Coinfest Asia 2024's official community partner! 🀝
β˜€οΈ Take part in Asia’s immersive Web3 festival, where innovation meets adoption.
🎟 Get your tickets at www.coinfest.asia and use our special promo code : CA24PASCALINDO to get 10% off!

Why Coinfest Asia?
● Unconventionally Engaging
Our immersive setting and programming leave you with more memory markers than any other event
● Dive into Emerging Markets
Get connected in Southeast Asia; the fastest-growing Web3 region in the world
● Jump straight into Adoption
Foster collaborations directly in Indonesia where there are 437k new crypto users each month

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com