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 21-07-2003, 11:08
CorelUser
Guest
 
Posts: n/a
Default How to display corel color window?

How can I call the corel color menu from my application, as we see in, ie., SecuriDesign?
Reply With Quote
  #2  
Old 02-08-2003, 01:48
jmp
Guest
 
Posts: n/a
Default

Hi,

I don't know if there is a VBA method from CorelDraw object model, but you can always invoke the Windows API SendMessage :

Public Const WM_COMMAND As Long = &H111

Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Sub UniformFillColorDialog()
SendMessage AppWindow.Handle, WM_COMMAND, 39665, 0
End Sub

Sub UniformStrokeColorDialog()
SendMessage AppWindow.Handle, WM_COMMAND, 39712, 0
End Sub

For the menu ID's 39665 and 39712, I have used CorelDraw 11. It is possible the values are to be changed if you are working with another version. You can spy the flow of WM_COMMAND messages with an utility like Spy++, WinSight32, etc.

HTH,
Jean-Marie
Reply With Quote
  #3  
Old 02-08-2003, 12:41
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: How to display corel color window?

Quote:
Originally Posted by CorelUser
How can I call the corel color menu from my application, as we see in, ie., SecuriDesign?
It is actually quite simple:

If you have a color object, just call its "UserAssignEx" function:

Code:
Sub ColorDialog()
    Dim c As New Color
    c.CMYKAssign 100, 0, 0, 0 ' Initial color
    If c.UserAssignEx() Then
        ' "c" now contains the color selected by user
    Else
        ' Dialog was canceled
    End If
End Sub
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
Corel Technology Partner Program Survey Alex CorelDRAW/Corel DESIGNER VBA 4 05-05-2005 09:00
run macro at start up Corel 11 ???? -=HKLC=- CorelDRAW/Corel DESIGNER VBA 14 30-10-2004 09:29
Is Corel to Excel data exchange possible? alex69 CorelDRAW/Corel DESIGNER VBA 8 24-06-2004 04:52
Side window ?! in Corel Draw.11 CorelUser CorelDRAW/Corel DESIGNER VBA 1 13-07-2003 23:51
Corel Capture 8 and Corel Script Helix CorelDRAW CS 0 13-12-2002 18:10


All times are GMT -5. The time now is 05:42.


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