Professional Documents
Culture Documents
Drop Drag
Drop Drag
'Disclaimer:
'All of the files available in this download are provided as-is,
without any
'warranty or support. All use of this utility is at your own risk.
The
code
'has been tested with PowerPoint 2000, PowerPoint 2002 and PowerPoint
2003
'(Both with/without Service Packs) where appropriate. This does not
guarantee
'that they will work on your machine.
'Licensing Policy:
'This code is provided as FREEWARE. You may use and adapt this
utility
for
'your own individual projects. It is NOT distributable. You CANNOT
bundle it
'with other individual /commercial applications without the prior
consent of
'the author. You may not include this utility in any shareware or
freeware
'catalogues, books, articles or periodicals without the written
permission of
'the author.
'Hans W. Hofmann.
'h w (at) p p t - u s e r .d e
Option Explicit
dx = GetSystemMetrics(SM_SCREENX): dPoint.x = dx
dy = GetSystemMetrics(SM_SCREENY): dPoint.y = dy
GetCursorPos mPoint
With ActivePresentation.SlideShowWindow
mWnd = WindowFromPoint(mPoint.x, mPoint.y)
GetWindowRect mWnd, WR
sx = WR.Left
sy = WR.Top
dx = (WR.Right - WR.Left) /
ActivePresentation.PageSetup.SlideWidth
dy = (WR.Bottom - WR.Top) /
ActivePresentation.PageSetup.SlideHeight
End With
If dx > dy Then
sx = sx + (dx - dy) * ActivePresentation.PageSetup.SlideWidth / 2
dx = dy
End If
If dy > dx Then
sy = sy + (dy - dx) * ActivePresentation.PageSetup.SlideHeight /
2
dy = dx
End If
While dragMode
GetCursorPos mPoint
sh.Left = (mPoint.x - sx) / dx - sh.width / 2
sh.Top = (mPoint.y - sy) / dy - sh.height / 2
DoEvents
i = i + 1: If i > 2000 Then dragMode = False: Exit Sub ' Not Aus
Wend
End Sub