Di seguito viene illustrata tale procedura.
Il metodo instr restituisce un numero, che corrisponde alla posizione della
parola che vogliamo cercare.
L'oggetto propbag ha il compito di gestire lo smart tag ossia di crearlo,
che avviene tramite il metodo GetNewPropertyBag della classe RecognizerSite.
Mentre il metodo CommitSmartTag della classe RecognizerSite ha il compito
di visualizzare tale tag, questo metodo accetta 4 argomenti, il nome del tag,
il punto da dove iniziare la sottolineatura e la lunghezza di tale sottolineatura,
ed il tag.
Proprietà SmartTagCount:
Questa proprietà ritorna il numero dei smart tag (nel
nostro caso uno)
Public ReadOnly Property SmartTagCount() As Integer
Implements Microsoft.Office.Interop.SmartTag.ISmartTagRecognizer.SmartTagCount
Get
Return
1
End
Get
End Property
Proprietà SmartTagDownloadURl
Questa proprietà ha il compito di ritornare un possibile
url
Public ReadOnly Property SmartTagDownloadURL(ByVal
SmartTagID As Integer) As String Implements Microsoft.Office.Interop.SmartTag.ISmartTagRecognizer.SmartTagDownloadURL
Get
'url
dello smart tag
Return ""
End
Get
End Property
Proprietà SmartTAgName:
Questa proprietà imposta (restituisce) il nome per ogni
singolo smart tag da notare che il nome situato dopo il simbolo del cancelletto
(#) dev'essere il nome del progetto.
Public ReadOnly Property SmartTagName(ByVal SmartTagID
As Integer) As String Implements Microsoft.Office.Interop.SmartTag.ISmartTagRecognizer.SmartTagName
Get
'nome
dello smart tag
Return "urn:esempio-smarttag#SmartTagE
manuele"
End
Get
End Property
|