Using Speechlib object in VFP9 I´d instantiate it as

loVoice = CREATEOBJECT("SAPI.SpVoice.1")

This object has members methods which I need to use in order to highlight
spoken words in an editvox.

Specifically methods WORD (StreamNum , StreamPos , Pos , Length ) returns
in the two last params the positions to write the statements

PROCEDURE highlightspokenwords
PARAMETERS pos, lenght

ThisForm.MaintextBox.SelStart= pos
ThisForm.MaintextBox.SelLength=lenght
ENDPROC

My question is : How to implement the WORD method after creating the
object?

Thanks

Alejandro Fernandez<

Re: Implementing events members of and Activex by Darwin

Darwin
Wed Sep 26 14:15:35 PDT 2007

Can you create a class based on the oleControl and then instantiate that
class?

Define Class SAPI As OleControl
OleClass='SAPI.SpVoice.1'
Top = 228
Left = 24
Height = 100
Width = 100
Name = "oSAPI"

PROCEDURE highlightspokenwords
PARAMETERS pos, lenght
....
ENDPROC

Enddefine

"Alejandro Fernandez" <afernan@emcali.net.co> wrote in message
news:uBlC%23bv$HHA.1168@TK2MSFTNGP02.phx.gbl...
> Using Speechlib object in VFP9 I´d instantiate it as
>
> loVoice = CREATEOBJECT("SAPI.SpVoice.1")
>
> This object has members methods which I need to use in order to highlight
> spoken words in an editvox.
>
> Specifically methods WORD (StreamNum , StreamPos , Pos , Length ) returns
> in the two last params the positions to write the statements
>
> PROCEDURE highlightspokenwords
> PARAMETERS pos, lenght
>
> ThisForm.MaintextBox.SelStart= pos
> ThisForm.MaintextBox.SelLength=lenght
> ENDPROC
>
> My question is : How to implement the WORD method after creating the
> object?
>
> Thanks
>
> Alejandro Fernandez<
>
>
>
>