From: Hett on
Hi all,

I've a problems with getting the Color(property) after the ShowColor
mehtod's call.

The CommonDialog control has the Color property, which should return
the color code, but it's in OLE_COLOR type.

How I can convert this type into the standart types of Navision
(integer, text, etc.)?

It's possible to get the value of the Color into the Variant type
variable, but the Evaluate function brings the following error:
"You cannot enter '' in Integer. The cursor is in front of the invalid
character"

How I can do this conversion?

Thanks in advance.

From: Andrzej on
>I've a problems with getting the Color(property) after the ShowColor
>mehtod's call.

Use Microsoft ScriptControl.

Variables:

lcDialog OCX Microsoft Common Dialog Control, version 6.0
RetVal Variant
riValue Integer
lcScript Automation 'Microsoft Script Control 1.0'.ScriptControl

Code:

CREATE(lcScript);
lcScript.Language := 'VBScript';
RetVal := lcScript.Eval(lcDialog.Color);
CLEAR(lcScript);

riValue := RetVal;


From: Hett on
Thanks, Andrzej.

You help me a lot. I've just completed the huge part of my task.

Thanks.
Hett.