Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have a class in which i have implemented IDispatch interface for IHTMLWindow2.
For catching window resize method.Now invoke is getting called,but still i am not able to trace that event in DISPID_WINDOWRESIZE. How can i catch IE window resize event.
Thanks in advance.
Posted

1 solution

JQuery has a built-in method for this:

$(window).resize(function () { /* do something */ });
For the sake of UI responsiveness, you might consider using a setTimeout to call your code only after some number of milliseconds, as shown in the following example, inspired by this:

function doSomething() {
    alert("I'm done resizing for the moment");
};

var resizeTimer;
$(window).resize(function() {
    clearTimeout(resizeTimer);
    resizeTimer = setTimeout(doSomething, 100);
});


Also check them:

http://stackoverflow.com/questions/1852751/window-resize-event-firing-in-internet-explorer[^]

http://mbccs.blogspot.in/2007/11/fixing-window-resize-event-in-ie.html[^]

http://remysharp.com/2008/05/15/windowonresize-hangs-ie6-and-ie7/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900