From: Steve Rindsberg on
In article <B004D40F-C79E-4AB5-863F-0724E8D7448D(a)microsoft.com>, Jeff wrote:
> Thanks for your help, Steve. Unfortuantely, I need to update data in
> embedded Excel objects and charts and that requires activating the shapes.

Well, that's certainly the exception that I had in mind. Drat.

How about minimizing the window ... certainly not a perfect solution, but better
than watching it dance the Excel-o-mambo.

> Previous Office versions look really good with LockWindowUpdate. PowerPoint
> 2007 shows all of the updates.
>
> "Steve Rindsberg" wrote:
>
> > In article <3DEE89A5-199F-46F3-A020-708E733FE742(a)microsoft.com>, Jeff wrote:
> > > I have used the LockWindowUpdate API call to prevent screen updating while my
> > > code is manipulating a presentation. This works great for PowerPoint 2003,
> > > but doesn't seem to work for PowerPoint 2007. Is there any solution?
> > >
> > > In PowerPoint 2007 the screen flashes all over the place while the
> > > presentaion is being modified and it look really bad.
> >
> > Shyam's suggested one approach. Another is to write the code in a way that
> > doesn't force screen refreshes. As a first step, eliminate any code that
> > selects shapes. It's not 100% possible to do this, but quite often you can get
> > away with it.
> >
> >
> > ==============================
> > PPT Frequently Asked Questions
> > http://www.pptfaq.com/
> >
> > PPTools add-ins for PowerPoint
> > http://www.pptools.com/
> >
> >


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/

From: Chirag on
If it is for a short duration, you might want to lock the desktop. Use
GetDesktopWindow() to get a handle to the desktop.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"Jeff" <Jeff(a)discussions.microsoft.com> wrote in message
news:3DEE89A5-199F-46F3-A020-708E733FE742(a)microsoft.com...
>I have used the LockWindowUpdate API call to prevent screen updating while
>my
> code is manipulating a presentation. This works great for PowerPoint
> 2003,
> but doesn't seem to work for PowerPoint 2007. Is there any solution?
>
> In PowerPoint 2007 the screen flashes all over the place while the
> presentaion is being modified and it look really bad.

From: Jeff on
Shyam, Steve, & Chirag:

Thank you for helping with my problem. I have tested with GetDesktopWindow
and have the same results. I have noticed that LockWindowUpdate(0) returns 0
in the cases where it is not working.

I have also noticed that the call I make to Presentation.NewWindow() seems
to trigger the problem. If I comment out the code where I work with a new
document window, then the screen appears to lock correctly. However, it is
difficult to avoid the NewWindow call in our code. Again, tha same code
works fine in Office 2003.

I assume that Presentation.NewWindow() is internally locking a window for
update in PPT 2007. Any thoughts?

LockWindow(21628820): 1
Presentation.NewWindow();
LockWindow(0): 0 << This is 1 if I don't call NewWindow()

"Jeff" wrote:

> I have used the LockWindowUpdate API call to prevent screen updating while my
> code is manipulating a presentation. This works great for PowerPoint 2003,
> but doesn't seem to work for PowerPoint 2007. Is there any solution?
>
> In PowerPoint 2007 the screen flashes all over the place while the
> presentaion is being modified and it look really bad.
From: Chirag on
In that case, do a LockWindowUpdate() after a call to NewWindow().

Something like:

LockWindowUpdate(PPTWindow)
.... code ...
LockWindowUpdate(0)
Presentation.NewWindow()
LockWindowUpdate(PPTWindow)
.... more code ...
LockWindowUpdate(0)

It does show the new window to the user before the processing with "more
code" but otherwise should result in a lot less flickering.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"Jeff" <Jeff(a)discussions.microsoft.com> wrote in message
news:38C730C9-479D-4AF1-A3BE-E8F3153BBFF9(a)microsoft.com...
> Shyam, Steve, & Chirag:
>
> Thank you for helping with my problem. I have tested with
> GetDesktopWindow
> and have the same results. I have noticed that LockWindowUpdate(0)
> returns 0
> in the cases where it is not working.
>
> I have also noticed that the call I make to Presentation.NewWindow() seems
> to trigger the problem. If I comment out the code where I work with a new
> document window, then the screen appears to lock correctly. However, it
> is
> difficult to avoid the NewWindow call in our code. Again, tha same code
> works fine in Office 2003.
>
> I assume that Presentation.NewWindow() is internally locking a window for
> update in PPT 2007. Any thoughts?
>
> LockWindow(21628820): 1
> Presentation.NewWindow();
> LockWindow(0): 0 << This is 1 if I don't call NewWindow()
>
> "Jeff" wrote:
>
>> I have used the LockWindowUpdate API call to prevent screen updating
>> while my
>> code is manipulating a presentation. This works great for PowerPoint
>> 2003,
>> but doesn't seem to work for PowerPoint 2007. Is there any solution?
>>
>> In PowerPoint 2007 the screen flashes all over the place while the
>> presentaion is being modified and it look really bad.

From: Jeff on
Chirag:

I tried that yesterday and it greatly reduced the flickering. It still
flashes, but I think it will be acceptable. I found that I needed to cal
LockWindowUpdate() after NewWindow() and also after DocumentWindow.Close().
Thank you all for your help and ideas.

"Chirag" wrote:

> In that case, do a LockWindowUpdate() after a call to NewWindow().
>
> Something like:
>
> LockWindowUpdate(PPTWindow)
> ... code ...
> LockWindowUpdate(0)
> Presentation.NewWindow()
> LockWindowUpdate(PPTWindow)
> ... more code ...
> LockWindowUpdate(0)
>
> It does show the new window to the user before the processing with "more
> code" but otherwise should result in a lot less flickering.
>
> - Chirag
>
> PowerShow - View multiple PowerPoint slide shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "Jeff" <Jeff(a)discussions.microsoft.com> wrote in message
> news:38C730C9-479D-4AF1-A3BE-E8F3153BBFF9(a)microsoft.com...
> > Shyam, Steve, & Chirag:
> >
> > Thank you for helping with my problem. I have tested with
> > GetDesktopWindow
> > and have the same results. I have noticed that LockWindowUpdate(0)
> > returns 0
> > in the cases where it is not working.
> >
> > I have also noticed that the call I make to Presentation.NewWindow() seems
> > to trigger the problem. If I comment out the code where I work with a new
> > document window, then the screen appears to lock correctly. However, it
> > is
> > difficult to avoid the NewWindow call in our code. Again, tha same code
> > works fine in Office 2003.
> >
> > I assume that Presentation.NewWindow() is internally locking a window for
> > update in PPT 2007. Any thoughts?
> >
> > LockWindow(21628820): 1
> > Presentation.NewWindow();
> > LockWindow(0): 0 << This is 1 if I don't call NewWindow()
> >
> > "Jeff" wrote:
> >
> >> I have used the LockWindowUpdate API call to prevent screen updating
> >> while my
> >> code is manipulating a presentation. This works great for PowerPoint
> >> 2003,
> >> but doesn't seem to work for PowerPoint 2007. Is there any solution?
> >>
> >> In PowerPoint 2007 the screen flashes all over the place while the
> >> presentaion is being modified and it look really bad.
>