I would like to create a macro for different brush sizes for painting. I would also like to have these in the brush selector drop down if possible otherwise I can add to a toolbar.
brushtool, brushsettings require brushid. However there's no "get" function to return the current active brush so I can learn about the brushID.
It ought to be simple, something like:
Sub HardBrush25()Dim cs As ObjectSet cs = PHOTOPAINT.CorelScriptcs.BrushTool 0, 0, 0, 20, 0, 25, 0, 0, 100, 99MsgBox "reset to 25"Set cs = NothingEnd Sub
BTW why do I need to create "cs" as an object that disables intellisense?
Thanks, Ted
See my answer here https://community.coreldraw.com/sdk/f/corel-photo-paint-api/60606/custom-brush-sizes-toolid-brushid-setactivetool-brushtool-brushsettings-nib
Also, they really frown on cross-posting, I know I got chewed out for it. ;)
Where from did you collect this piece of code?
Nobody oblige you to use the variable declaration. You can just use:
PHOTOPAINT.CorelScript.BrushTool 0, 0, 0, 20, 0, 25, 0, 0, 100, 99
But not the object declaration is the reason of Intellisense missing.
I am asking about the code source/provenience because it looks that it does not set the brush dimension and should do something else. In the Photo-Paint (strangeș/nsuficient) documentation it is written: