How reduce height of slide show window

  • Thread starter Thread starter Baz
  • Start date Start date
B

Baz

Hi!

Can anyone kindly suggest a pointer on how to reduce the
height of the slide show window? - (I would like to have
another application window showing when the slides are
presented). Or is it not possible?

I have tried every which way to do this and the best I
can achieve is to write an Add-In which calls
slideshowwindow.SetHeight().

What happens with this is that the slide window is
reduced in height - but then so is the width!

Also can anyone suggest why the height that you get with
slideshowwindow.GetHeight() does not correspond to the
screen pixel height?

Baz
 
Also can anyone suggest why the height that you get with
slideshowwindow.GetHeight() does not correspond to the
screen pixel height?

What kind of discrepancy are you seeing, and what version of PPT do you use?
 
Hi Shyam,

Many thanks - I will - I have lived with C++ for the last
5 years so my VB is a bit rusty but it may give me a
pointer in the right direction. Did you try to do the job
with Ppnt objects before coming up with your solution? Do
you feel the same route could be taken with C++?

Regards Baz
 
Baz,
The values are correct. You need to do a Points to Pixel conversion and you
will get the pixel value which will correspond to 1024 x 768. The VB
equivalent would be as follows:

Option Explicit

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal
hDC As Long) As Long
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal
nIndex As Long) As Long

Const LOGPIXELSX = 88
Const LOGPIXELSY = 90
Const TWIPSPERINCH = 1440

Sub ConvertPOINTSToPIXELS(X As Single, Y As Single)
Dim hDC As Long, hwnd As Long, RetVal As Long
Dim XPIXELSPERINCH, YPIXELSPERINCH
hDC = GetDC(0)
XPIXELSPERINCH = GetDeviceCaps(hDC, LOGPIXELSX)
YPIXELSPERINCH = GetDeviceCaps(hDC, LOGPIXELSY)
RetVal = ReleaseDC(0, hDC)
X = (X * 20 * XPIXELSPERINCH) / TWIPSPERINCH
Y = (Y * 20 * YPIXELSPERINCH) / TWIPSPERINCH
End Sub

Sub Test()
Dim X As Single, Y As Single
X = 768
Y = 576
Call ConvertPOINTSToPIXELS(X, Y)
Debug.Print X, Y
End Sub


--
Regards
Shyam Pillai

Handout Wizard
http://www.mvps.org/skp/how/
 
Hi Shyam,

Many Thanks

I did use you code snippet and I can now get the slide
show window to sit nicely on top of my other app window.
Now I've just got to work out how to stop PPnt from
reducing the slide view width - it seems to want its own
aspect ratio...

Baz
 
Hi Steve,

I just saw your reply - thanks.

I will try that tomorrow - right now though I've spent 12
hrs on my computer and I need to recharge!

Barry
 
Hi Steve,

OK ... curiosity got the better of me despite being on
low charge. I tried what you said and it did the trick!

I'm so used to changing things programatically I never
thought to use PowerPoint itself. This will get me out of
a deadline panic but - hmmm - there must be a way of
doing this programmatically. I searched my MSDN on an
object PageSetUp which seems to be available to VB folk
but not for us poor C++ guys! I'll give it another shot
tomorrow.

Once again - many thanks,

Baz
 
I'm so used to changing things programatically I never
thought to use PowerPoint itself. This will get me out of
a deadline panic but - hmmm - there must be a way of
doing this programmatically. I searched my MSDN on an
object PageSetUp which seems to be available to VB folk
but not for us poor C++ guys! I'll give it another shot
tomorrow.

ActivePresentation.PageSetup.SlideHeight and .SlideWidth would do it in VBA.
I'd bet you can do it in C++ as well. Not as easily, maybe, but surely as
well/
And if you can't do it, you can pointer at it? ;-)
 
Back
Top