Office Visio 是Office軟件系列中的負責繪制流程圖和示意圖的軟件,是一款便于IT和商務人員就復雜信息、系統和流程進行可視化處理、分析和交流的軟件。使用 Office Visio 圖表,可以促進對系統和流程的了解。 ?回顧Visio的對象 Application對象 Window對象 Document對象 Page對象 Master對象 Shape對象 Cell對象 ![]() C#進行Visio二次開發相關事件匯總 ? Visio對象還有 Selection對象 Connects對象 Style對象 Keyboard Mouse DataRecordset Application對象的事件 右鍵菜單:MarkerEvent 程序退出前:BeforeQuit 模態窗口關閉后:AfterModal 模態窗口出現前:BeforeModal Visio事件完成:NoEventsPending 程序激活:AppActivated 程序掛起前:BeforeSuspend 進入獲取退出Scopes:EnterScope/ExitScope 用戶動作響應提示:QueryCancelQuit … … Window對象的事件 窗口打開:WindowOpened 窗口改變:WindowChanged 窗口關閉前:BeforeWindowClosed 窗口關閉取消:WindowCloseCanceled 窗口選區Shape被刪除: BeforeWindowSelDelete 窗口頁面改變前: BeforeWindowPageTurn 窗口頁面改變后:WindowTurnedToPage Visio窗口改變:WindowActivated … … ? Document對象事件 文檔添加:DocumentAdded 文檔創建:DocumentCreated 打開文檔:DocumentOpened 文檔改變:DocumentChanged 文檔保存:DocumentSaved 文檔關閉:BeforeDocumentClose … … Page對象事件 頁面添加:PageAdded 頁面改變:PageChanged 頁面刪除:BeforePageDelete 取消頁面刪除:PageDeleteCanceled … … Shape對象事件 Shape刪除前:BeforeShapeDelete Shape添加:ShapeAdded Shape改變:ShapeChanged Shape刪除后: ShapesDeleted Shape文本編輯:BeforeShapeTextEdit Shape文本編輯退出:ShapeExitedTextEdit Shape 連接添加:ShapeLinkAdded Shape 連接刪除: ShapeLinkDeleted Shape 組合變化: ShapeParentChanged Master對象事件 模具添加:MasterAdded 模具改變:MasterChanged 模具刪除:BeforeMasterDelete 取消模具刪除:MasterDeleteCanceled 模具刪除提示:QueryCancelMasterDelete https://www.office26.com/visio/ ? Cell對象事件 Cell的值改變:CellChanged Cell的formula 改變:FormulaChanged Selection對象事件 選區刪除前:BeforeSelectionDelete 選區刪除提示:QueryCancelSelectionDelete 選區增加:SelectionAdded 選區改變:SelectionChanged 選區取消:SelectionDeleteCanceled https://www.office26.com/visio/ Connects對象事件 連接添加:ConnectionsAdded 連接移除:ConnectionsDeleted Style對象事件 Style添加:StyleAdded Style改變: StyleChanged Style刪除前: BeforeStyleDelete Style取消刪除: StyleDeleteCanceled Style刪除提示:QueryCancelStyleDelete Keyboard對象事件 KeyDown KeyPress KeyUp Mouse對象事件 MouseDown MouseMove MouseUp 事件的處理 實現接口IVisEventProc public class EventSink : IVisEventProc 使用AddAdvise建立事件偵聽 documentEvents.AddAdvise( (unchecked((short)VisEventCodes.visEvtAdd) + (short)VisEventCodes.visEvtShape), (IVisEventProc)this, sink, "ShapeAdd"); 實現object IVisEventProc.VisEventProc()函數,和具體處理函數掛鉤 Visio幫助您創建具有專業外觀的圖表,以便理解、記錄和分析信息、數據、系統和過程。 |
溫馨提示:喜歡本站的話,請收藏一下本站!