soleimanian 0 Report post Posted September 3, 2004 Copy and paste the code from the text area below to tcboo.c// Jim Lawless// jimbo@radiks.net// http://www.radiks.net/~jimbo///// Simple popup remover for Internet Explorer. Only one// IEFrame window will be allowed open at any time.#include <windows.h>#include <stdio.h>#pragma comment(lib, "user32.lib")BOOL CALLBACK enumProc(HWND h,DWORD d);HINSTANCE hInst;HWND theWindow=0;main() { printf("There can be only one ... IE window.\n"); for(; { EnumWindows((WNDENUMPROC)enumProc,0); Sleep(1000); }}BOOL CALLBACK enumProc(HWND h,DWORD d) { char buff[256]; char *p; GetClassName(h,buff,255); if(!stricmp(buff,"IEFrame")) { if(IsWindow(theWindow)&&h!=theWindow) { GetWindowText(h,buff,254); printf("Closing %s\n",buff); MessageBeep(0); PostMessage(h,WM_CLOSE,0,0L); } else { theWindow=h; } } return TRUE;}The above program employs a simple technique to avert popup ads while using Internet Explorer. The program scans all windows once per second looking for all IEFrame windows. It will only allow one IEFrame window on the screen at a time, which effectively thwarts popup ads. Share this post Link to post Share on other sites
jcguy 0 Report post Posted September 5, 2004 That looks pretty useful, I'm assulted by countless ads while surfing. But where and what is this tcboo.c to copy to?Thanks anyway for the code Share this post Link to post Share on other sites
Hercco 0 Report post Posted September 7, 2004 That looks pretty useful, I'm assulted by countless ads while surfing. But where and what is this tcboo.c to copy to? <{POST_SNAPBACK}> Nowhere. It needs to be compiled with a C++ compiler. BTW, I tested it and it works very well. Good job. Share this post Link to post Share on other sites
Garthnak 0 Report post Posted September 14, 2004 A very interesting hack - though not very useful for those of us that like to use multiple windows at one time :-) I just use Mozilla Firefox these days, it has built-in popup blocking. But I do like this little hack. Share this post Link to post Share on other sites
honeycomb 0 Report post Posted September 14, 2004 I have used popup ad block software, but I don't use it now. why?I study Business Management in part time, and my school have a website, inform us when take examination in a popup window, last time I missed a examination! as the software blocked the popup window. Share this post Link to post Share on other sites