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 11-05-2011, 15:53
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default Hide the fact that Draw is Running

Hi.
I was wondering how you can hide the fact that Draw is running from vba when using Win Api to open a file. I want the file to open in a new instance of Draw.
~John
Reply With Quote
  #2  
Old 26-05-2011, 08:45
SteveDude SteveDude is offline
Senior Member
 
Join Date: Dec 2005
Location: Salina, Kansas USA
Posts: 149
Default ...

On way is to simply execute draw with a command line option of the filename you want to open and then use VBA's Visible = False. You can then use various API's to validate the current state of Draw.

...not sure what you mean about hiding it from VBA, but you can instantiate mulitple instances of Corel and limit VBA commands to a specific application object reference.

Last edited by SteveDude; 26-05-2011 at 08:49.
Reply With Quote
  #3  
Old 26-05-2011, 13:49
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Oh sorry, I left this out...
I wanted to control 2 instances of Draw with VBA.

Quote:
Originally Posted by SteveDude View Post
...not sure what you mean about hiding it from VBA, but you can instantiate mulitple instances of Corel and limit VBA commands to a specific application object reference.
Yep. This is the part I couldn't get. Every time I set an instance of the app I can't seem to grab the new instance.
Kinda like this:


Sub openIt()
Dim app1 As CorelDRAW.Application
Set app1 = CreateObject("CorelDraw.Application.15")

Dim app2 As New CorelDRAW.Application
Set app2 = CreateObject("CorelDraw.Application.15")

'do something with each....
app1.ActiveDocument.ClearSelection 'just an example
app2.ActiveDocument.ClearSelection 'just an example
End Sub


~John

Last edited by runflacruiser; 26-05-2011 at 13:53.
Reply With Quote
  #4  
Old 26-05-2011, 13:53
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

I revised my last post above...
Reply With Quote
  #5  
Old 27-05-2011, 09:37
SteveDude SteveDude is offline
Senior Member
 
Join Date: Dec 2005
Location: Salina, Kansas USA
Posts: 149
Default ...

I think where you are going wrong is running the two instances in the same sub. I wrap mine in a standalone DLL object that I then have more control off. Think you could probably do the same with a class.
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
Working in X5 & like to know if X4 is running aakkaarr CorelDRAW/Corel DESIGNER VBA 0 24-01-2011 10:36
How hide the navigation page TheFez CorelDRAW/Corel DESIGNER VBA 2 15-01-2009 02:12
Problems running my app at other PC. areyesa1 CorelDRAW/Corel DESIGNER VBA 0 03-07-2006 10:49
Hide/ Show Toolbars ivelink CorelDRAW/Corel DESIGNER VBA 1 23-06-2005 11:17
is application running? Seelenquell CorelDRAW/Corel DESIGNER VBA 18 10-02-2004 09:40


All times are GMT -5. The time now is 15:07.


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