OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-10-2012, 02:57
katruax katruax is offline
Member
 
Join Date: Jan 2012
Posts: 35
Default VBA Switch to specific CorelDRAW tool?

Is there a way in VBA or .net to switch to a specific tool in CorelDRAW?...

Say for example I want to switch to the 2 point line tool... Is there an easy way to do that?...

I am trying to make a form that would have all my most used tools on it rather than a toolbar and also there is times where we run some VBA code and it would be nice if a particular tool was already active once we run that code.

Thank you,

Kevin
Reply With Quote
  #2  
Old 12-10-2012, 03:06
katruax katruax is offline
Member
 
Join Date: Jan 2012
Posts: 35
Default

So I had a thought on this... I created a new toolbar... Dropped the 2 point line tool on it... Then saved my toolbar to an xslt file...

I can now see some code that calls that 2 point line tool.. .what to do with that or if I can use that I don't know?...


Any suggestions?..

Thank you,

Kevin
Reply With Quote
  #3  
Old 12-10-2012, 21:46
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default ActiveTool

There are a couple of ways to change the Active Tool, the first is like this:
Code:
Sub ToolActive()
    ActiveTool = cdrToolEyeDropper
End Sub
The other is as you described to place a tool on a toolbar, export the workspace to get the GUID of the tool, then you can invoke that tool. So for the 2-point line it would be like this:
Code:
Sub TwoPointLine()
    Application.FrameWork.Automation.Invoke "7c391635-ddb3-45b6-b62b-66827f20547c"
End Sub
Best of luck,

-Shelby
Reply With Quote
  #4  
Old 13-10-2012, 07:21
katruax katruax is offline
Member
 
Join Date: Jan 2012
Posts: 35
Default

Thank you Shelby... I remember you showed me once and then I forgot so thank you for the reminder...

Kevin
Reply With Quote
Reply


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
X5 Watch For Specific Action knowbodynow CorelDRAW/Corel DESIGNER VBA 15 06-05-2010 00:24
Align to Specific Layer ProofingGuy CorelDRAW/Corel DESIGNER VBA 6 11-06-2008 17:11
Auto keyboard switch - WHERE is it? corel9master CorelDRAW/Corel DESIGNER VBA 3 31-03-2004 13:06
How do you switch Bitmap modes in CorelDraw 10 VBA? Rick Randall CorelDRAW/Corel DESIGNER VBA 1 14-05-2003 09:06


All times are GMT -5. The time now is 11:17.


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