OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 21-07-2003, 11:08
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
Old 02-08-2003, 01:48
Posts: n/a


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.

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

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:

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
        ' Dialog was canceled
    End If
End Sub
Reply With Quote

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