Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / January 2007

Tip: Looking for answers? Try searching our database.

Pointer/Mouse location during slideshow

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paxdak@yahoo.com - 15 Jan 2007 22:00 GMT
Is there a way to determine the mouse location (x,y position) during a
slideshow?

I have a large graphic that I want the user to be able to click on to
enlarge. This works well for graphics that are small relative to the
slide.  I can double the graphic size and have it all display on the
slide.  In some cases, the graphic takes up most of the slide. Doubling
the size would only show part of the graphic.

I'd like to control how the graphic is enlarged.  For example, if the user
clicks in the upper right portion, the graphic would enlarge holding the
upper right corner of the graphic, and grow down/to the left.  Basically
it would zoom to the portion of the graphic that the user clicks on.  I
could do this by comparing the mouse position relative to the position and
size of the graphic.

The fall back plan is to have 4 transparent boxes overlaid on the graphic
that would control the zoom.

Any help/suggestions would be appreciated.

TIA
John Wilson - 16 Jan 2007 08:13 GMT
Unless you have fair vba skills I would go with the transparent box idea. If
you know how to use vba you can read the mouse click position like this

Public Const VK_LBUTTON = &H1
Public Type POINTAPI
X As Long
Y As Long
End Type
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As
Long
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As
Long) As Integer
Option Explicit

Sub mousecursor()
Dim pCur As POINTAPI
Do
If GetAsyncKeyState(VK_LBUTTON) <> 1 Then
If GetAsyncKeyState(VK_LBUTTON) <> 0 Then
Do Until GetAsyncKeyState(VK_LBUTTON) = 0
DoEvents
Loop
GetCursorPos pCur
MsgBox ("x coord:" & pCur.X & ", " & _
"y coord:" & pCur.Y)
Exit Sub
End If
End If
DoEvents
Loop
End Sub

Signature

email john AT technologytrish.co.uk

"Glass" action buttons - http://www.technologytrish.co.uk/pptbuttons.html
Personalised calendars -  http://technologytrish.co.uk/calendars

> Is there a way to determine the mouse location (x,y position) during a
> slideshow?
[quoted text clipped - 16 lines]
>
> Any help/suggestions would be appreciated
paxdak@yahoo.com - 16 Jan 2007 17:16 GMT
Thanks John. That works great.

I'm just going to use the  Function GetCursorPos in my "on click" action
setting for the graphic so it only calls teh function when its needed.
 
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.