Hi, everyone, I am finding a way to trigger a event when a group is being ungrouped in CDR X7 with C#? But I don't find such an existing event, do I miss something or could I create such event mannually?
By the way, because I need to export selections to image, and I want the images having some margins, but didn't find any export parameter in export method. Is there anyone got some advise?
Thank you very much.
————
edited 2023-02-10, irrelative description was remove to make the issue clear.
HiUnfortunately I do not write in C#, in VBA only. I implemented a similar task as follows:In the =ThisDocument= module, I used the =SelectionChange= event handler
Public gCount&Private Sub Document_SelectionChange() Dim gSR As ShapeRange Set gSR = ActivePage.Shapes.FindShapes(Type:=cdrGroupShape) If gCount > gSR.Count Then MsgBox "The groups count has been reduced" gCount = gSR.CountEnd Sub
so, when the user ungroups the shapes, a reminder is displayed.I hope it will be similar in C#Taras
Excellent, it works, thank you.
To export images with some margins just draw rectangle bigger, select it and your image and export with cdrSelected parameter
Hi, shark, Thank you for the advise I will try to implement this. The only thing I think is troublesome is that I should delete the rectange created and remove the creation history.
You could use virtual shape. Creation and deleting of virtual shapes are not logged in history.