ActiveX Property stdole.Picture/stdole.Font

This forum is for eXpress++ general support.
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ActiveX Property stdole.Picture/stdole.Font

#11 Post by unixkd »

Thanks Jimmy.

I used AutomationTranslateColor(), did NOT work.

Meanwhile concerning the Text to Speech Object, where can I get the other properties and methods of the object "SAPI.SpVoice" ?

Joe

User avatar
Auge_Ohr
Posts: 1408
Joined: Wed Feb 24, 2010 3:44 pm

Re: ActiveX Property stdole.Picture/stdole.Font

#12 Post by Auge_Ohr »

unixkd wrote:I used AutomationTranslateColor(), did NOT work.
hm ... perhaps HEX Value need for Color ...
unixkd wrote:Meanwhile concerning the Text to Speech Object, where can I get the other properties and methods of the object "SAPI.SpVoice" ?
MSDN ... http://msdn.microsoft.com/en-us/library ... 85%29.aspx
greetings by OHR
Jimmy

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ActiveX Property stdole.Picture/stdole.Font

#13 Post by unixkd »

Thanks Jimmy,

1. I need a function to convert Xbase++ color aRGB Color to Hexadecimal.

2. How do you specify Hexadecimal constant in Xbase++ ?

Joe

User avatar
Auge_Ohr
Posts: 1408
Joined: Wed Feb 24, 2010 3:44 pm

Re: ActiveX Property stdole.Picture/stdole.Font

#14 Post by Auge_Ohr »

unixkd wrote:1. I need a function to convert Xbase++ color aRGB Color to Hexadecimal.
2. How do you specify Hexadecimal constant in Xbase++ ?
try this using ot4xb cByte2Hex() Function

Code: Select all

FUNCTION Color2Hex(xValue)
LOCAL cHex := "0x"
LOCAL aColor := {0,0,0}

   DO CASE
      CASE VALTYPE(xValue) = "A"
         cHex += cByte2Hex(xValue[3])+;
                 cByte2Hex(xValue[2])+;
                 cByte2Hex(xValue[1])

      CASE VALTYPE(xValue) = "N"
         aColor := GraGetRGBIntensity(xValue)

         IF aColor <> NIL
            cHex += cByte2Hex(aColor[3])+;
                    cByte2Hex(aColor[2])+;
                    cByte2Hex(aColor[1])
         ELSE

            IF xValue = XBPSYSCLR_TRANSPARENT
               cHex := "-1"
            ELSE

               DO CASE
                  CASE xValue = GRA_CLR_WHITE     ; aColor := {255,255,255}
                  CASE xValue = GRA_CLR_BLACK     ; aColor := {000,000,000}
                  CASE xValue = GRA_CLR_BLUE      ; aColor := {000,000,255} // {076,076,254}
                  CASE xValue = GRA_CLR_RED       ; aColor := {255,000,000} // {254,076,076}
                  CASE xValue = GRA_CLR_PINK      ; aColor := {255,128,255} // {254,076,252}
                  CASE xValue = GRA_CLR_GREEN     ; aColor := {000,255,000} // {076,254,076}
                  CASE xValue = GRA_CLR_CYAN      ; aColor := {128,255,255} // {076,252,254}
                  CASE xValue = GRA_CLR_YELLOW    ; aColor := {255,255,128} // {253,254,076}
                  CASE xValue = GRA_CLR_DARKGRAY  ; aColor := {192,192,192}
                  CASE xValue = GRA_CLR_DARKBLUE  ; aColor := {000,000,160} // {000,000,204}
                  CASE xValue = GRA_CLR_DARKRED   ; aColor := {128,000,000} // {204,000,000}
                  CASE xValue = GRA_CLR_DARKPINK  ; aColor := {255,000,255} // {204,000,201}
                  CASE xValue = GRA_CLR_DARKGREEN ; aColor := {000,128,000} // {000,204,000}
                  CASE xValue = GRA_CLR_DARKCYAN  ; aColor := {000,128,255} // {000,201,204}
                  CASE xValue = GRA_CLR_BROWN     ; aColor := {128,064,000} // {202,204,000}
                  CASE xValue = GRA_CLR_PALEGRAY  ; aColor := {219,219,219}
               ENDCASE

               cHex += cByte2Hex(aColor[3])+;
                       cByte2Hex(aColor[2])+;
                       cByte2Hex(aColor[1])
            ENDIF
         ENDIF

   ENDCASE

RETURN cHex
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ActiveX Property stdole.Picture/stdole.Font

#15 Post by rdonnay »

Try this:

Code: Select all

oNotify:setProperty("Picture",oFoto:GetIPicture())
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ActiveX Property stdole.Picture/stdole.Font

#16 Post by unixkd »

Hi Roger

I tried it, did NOT work

Thanks

Joe

Post Reply