Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / February 2006

Tip: Looking for answers? Try searching our database.

how to defer the redraw of the img or the document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charlie Hoo - 31 Jan 2006 21:09 GMT
Hello,

I am working on a html page as simple as following:

<html><head><title>test</title>
<script language="javascript">
function doZoom()
{
   var zoom=parseInt(oImg.style.zoom) + z;
   oImg.style.zoom = zoom + "%";
   document.body.scrollLeft += 10;
   document.body.scrollTop +=10;
}
</script>
</head>
<body STYLE="OVERFLOW:hidden;padding:0px;margin:0px;">
<table id="oTable" width=100% height=100% cellpadding=0
cellspacing=0><tr><td align=center valign=middle>
<img id=oImg onmousedown="doZoom();" style="zoom:100%">
</td>
</tr>
</table>
</body>
</html>

It works fine except that the screen will flick as it first do the zooming,
then it move to the left by 10px. How to make the function flickless? In
other words, how to make the document to update the screen only once instead
multiple times?

Thanks a lot.

Charlie
Kevin Yu [MSFT] - 01 Feb 2006 06:21 GMT
Hi Charlie,

Do you mean that the image on the page is flashing or flicking? I tried
with a small jpg file (96*96) on my machine, and it works fine. If the
picture is too big, it will be flicking because of the performance. It is a
behavior by IE. AFAIK, We can do nothing to prevent this from happening.

Kevin Yu
Signature

=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Charlie Hoo - 01 Feb 2006 13:47 GMT
Hello, Kevin,

You need to have jpg file larger than your IE window size to see the
flicking. I use a jpg file(1280x960) for the test. In MFC application, I can
defer the update(redrawing) of the interface until I want to, I wonder if it
is possible to do that with DHTML for IE document?

Thanks a lot.

Charlie

> Hi Charlie,
>
[quoted text clipped - 8 lines]
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
Kevin Yu [MSFT] - 02 Feb 2006 04:16 GMT
Hi Charilie,

I have reproduced this on my machine with a larger picture. But
unfortunately, AFAIK, there is nothing we can do on this, because all of
them are handled by IE, unlike in MFC windows form apps.

Kevin Yu
Signature

=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.