yomo1314 发表于 2018-4-7 10:19:19

PPT2003播放状态下托动对象的“宏”在2010和2016版下都不能用!

PPT2003播放状态下托动对象(鼠标跟随)的“宏”为什么在2010版和2016版下都不能很好的用呢?2010版的PPT里运行不正常,32位2016版的PPT运行卡,64位2016版的PPT里干脆就不能用。我把例子上传到附件了,麻烦各位大神给看看!或者有没有更好的实现播放状态下托动对象的办法?因为我要上公开课用,很急哟!拜托!拜托!



yanjinbin 发表于 2018-4-8 16:38:30

那就直接用2003版不就行了,或者在电脑上装一个绿色的PPT 2003就可以了

yanjinbin 发表于 2018-4-8 16:42:02

个人觉得,很多VBA或宏,2003的,在高版本中,都不能使用

杨位敬 发表于 2018-4-8 16:54:12

如果要在64位的系统中,使用,需要添加PtrSafe,进行如下修改就可以了:

Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Declare PtrSafe Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare PtrSafe Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare PtrSafe Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long
Private Declare PtrSafe Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Public Declare PtrSafe Function MonitorFromPoint Lib "user32.dll" (ByVal x As Long, ByVal y As Long, ByVal dwFlags As Long) As Long
Private Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

yomo1314 发表于 2018-4-8 21:13:40

杨位敬 发表于 2018-4-8 16:54
如果要在64位的系统中,使用,需要添加PtrSafe,进行如下修改就可以了:

Declare PtrSafe Function GetK ...

谢谢您了!我回头试试啊!

yomo1314 发表于 2018-4-13 22:48:16

杨位敬 发表于 2018-4-8 16:54
如果要在64位的系统中,使用,需要添加PtrSafe,进行如下修改就可以了:

Declare PtrSafe Function GetK ...
在2010版里测试,单击对象后可以跟随光标移动,但是再次单击对象时又跳回原处了,不知道怎么回事!
页: [1]
查看完整版本: PPT2003播放状态下托动对象的“宏”在2010和2016版下都不能用!