Re: Implementing events members of and Activex

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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@xxxxxxxxxxxxx> wrote in message
news:uBlC%23bv$HHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
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<






.