這篇文章主要為大家展示了“ppt如何做拖動互動”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領大家一起研究并學習一下“ppt如何做拖動互動”這篇文章吧。
成都創新互聯公司從2013年創立,是專業互聯網技術服務公司,擁有項目成都網站設計、成都做網站網站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元青島做網站,已為上家服務,為青島各地企業和個人服務,聯系電話:028-86922220
一、普通視圖模式
在普通視圖模式(不是全屏模式)下,即在編輯狀態下,自然能實現圖片的拖動功能。
優點:簡單易行。
缺點:1.窗口較小,可視性不好;2.自定義動畫效果無法實現。
二、宏
建議將宏的安全級別設置為低。
1、新建一個ppt空白文檔。
2、點擊菜單:“工具——宏——宏”,出現對話框。
3、對話框中“宏名”隨意寫個,比如:move,再點“創建”,就進入代碼模式。
4、刪去所有的代碼,把下面的代碼全拷貝進去。
Option Explicit Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long Private Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long Public Declare Function MonitorFromPoint Lib "user32.dll" (ByVal x As Long, ByVal y As Long, ByVal dwFlags As Long) As Long Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long Private Const SM_SCREENX = 0 Private Const SM_SCREENY = 1 Private Const sigProc = "Drag & Drop" Public Const VK_SHIFT = &H10 Public Const VK_CTRL = &H11 Public Const VK_ALT = &H12 Private Type PointAPI x As Long y As Long End Type Public Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Public mPoint As PointAPI, dPoint As PointAPI Public ActiveShape As Shape Dim dragMode As Boolean Dim dx As Double, dy As Double Sub DragandDrop(sh As Shape) dragMode = Not dragMode If dragMode Then Drag sh End Sub Private Sub Drag(sh As Shape) Dim i As Integer, sx As Integer, sy As Integer Dim mWnd As Long, WR As RECT 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 Wend End Sub
5、點擊保存后,關閉代碼模式,回到ppt設計頁面。在你需要拖動的圖片上點右鍵,選擇“動作設置——單擊鼠標——運行宏——確定”。
6、放映幻燈片,看看效果吧。
優點:可視性強。
缺點:對于PPT新手來說不易操作。
以上是“ppt如何做拖動互動”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注創新互聯行業資訊頻道!
標題名稱:ppt如何做拖動互動
URL標題:http://newbst.com/article46/gdoseg.html
成都網站建設公司_創新互聯,為您提供全網營銷推廣、網站設計公司、自適應網站、商城網站、電子商務、定制網站
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯