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 14-01-2005, 15:26
CORNMEN
Guest
 
Posts: n/a
Default Bring Coreldraw to front of other windows.

Hello,
I use vb in access to control coreldraw.
I've recently upgraded to version 12 of CorelDraw. So far the only problem I've found with my scripts is when I bring CorelDraw to the top of other windows. I've always done this as follows:

dim app as coreldraw.application
set app=new coreldraw.application
app.appwindow.windowstate=cdrwindowminimized
app.appwindow.windowstate=cdrwindowmaximized

With version 11 this worked fine, but in 12, all the toolbars get messed up.

If there is a different way of doing the same thing, please offer advice.
Thanks,
Mike
Reply With Quote
  #2  
Old 14-01-2005, 15:58
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

Using Access 2003 and CorelDraw 12 I can confirm this as a bug. It messes up the toolbars.

My question would be why you min then max the window. Why not just Maximize the window, that seems to work just fine. It is only when you do both it has problems.
Reply With Quote
  #3  
Old 14-01-2005, 16:04
CORNMEN
Guest
 
Posts: n/a
Default nothing happens.

when i just maximize, nothing happens.

So, when you're in access, you call
app.appwindow.windowstate=cdrwindowmaximized
and coreldraw comes to the top?

Thanks,
Mike
Reply With Quote
  #4  
Old 14-01-2005, 16:06
CORNMEN
Guest
 
Posts: n/a
Default It works for me if....

Just maximizing works if I happened to minimize coreldraw, the last time I used it.

However, if I just switch to a different application without minimizing coreldraw first, nothing happens.

Mike
Reply With Quote
  #5  
Old 14-01-2005, 16:38
CORNMEN
Guest
 
Posts: n/a
Default Found the answer.

In the top of the module, I added
Declare Function SetForegroundWindow Lib "user32" (byval hwnd as long) as boolean

Then in my script i do

dim temp as boolean
temp=setforegroundwindow(app.activewindow.handle)


Mike
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
CorelDRAW 12 SP1 is available Alex CorelDRAW/Corel DESIGNER VBA 1 04-08-2004 02:43
Accesing CorelDraw 10 VBA Object Model without running it dolmos CorelDRAW/Corel DESIGNER VBA 5 19-12-2003 08:52
Preview from CorelDRAW file and/or worksheet reanan CorelDRAW/Corel DESIGNER VBA 5 15-05-2003 19:29
Creating macros for CorelDraw 10 in CorelDraw 11 Rick Randall CorelDRAW/Corel DESIGNER VBA 1 14-03-2003 09:00
CorelDRAW 11 and AddIn’s reanan CorelDRAW/Corel DESIGNER VBA 2 03-12-2002 15:21


All times are GMT -5. The time now is 21:26.


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