OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 20-03-2006, 06:01
Posts: n/a
Question Get Global Events

How in X3 get events of moving shapes, change page, etc. ???
in CD11 it was as:

Private Sub GlobalDocument_ShapeMoved(ByVal Shape As Shape)
End Sub

Private Sub GlobalDocument_PageSelected(ByVal PAGE As PAGE)
End Sub
Reply With Quote
Old 20-03-2006, 09:02
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

Put the following code in ThisMacroStorage module:

Dim WithEvents CurDoc As Document

Private Sub GlobalMacroStorage_WindowActivate(ByVal Doc As Document, ByVal Window As Window)
    Set CurDoc = Doc
End Sub

Private Sub GlobalMacroStorage_WindowDeactivate(ByVal Doc As Document, ByVal Window As Window)
    Set CurDoc = Nothing
End Sub

Private Sub CurDoc_PageActivate(ByVal Page As Page)
    Debug.Print "Page activated"
End Sub

Private Sub CurDoc_ShapeMove(ByVal Shape As Shape)
    Debug.Print "Shape moved"
End Sub
Then you can access any of the document events for the CurDoc object. I have added two for example above.

For more information on how add application events to your GMS module, see my reply to this thread: http://forum.oberonplace.com/showthread.php?t=667
Reply With Quote
Old 20-03-2006, 11:07
Posts: n/a
Thumbs up

Many thanks! All works
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global Macro delete Michael Cervantes CorelDRAW/Corel DESIGNER VBA 17 16-11-2010 08:11
ThisDocument Events mapcar Corel Photo-Paint VBA 1 16-08-2009 14:23
Are there Other Events in CorelDraw? Jon Lorber CorelDRAW/Corel DESIGNER VBA 2 10-08-2005 09:17
Corel Photo Paint 11 Document Events problem cyrilgupta Corel Photo-Paint VBA 1 07-11-2004 12:51
How to use events from CorelDRAW.Document in my code? me CorelDRAW/Corel DESIGNER VBA 2 30-10-2004 02:49

All times are GMT -5. The time now is 13:36.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com