G
Guest
hi, i have these 2 code snippets:
Public Sub ImRec(ByVal IM As IAccIm, ByVal Sender As IAccUser)
Dim str As String = IM.GetConvertedText(DECODE)
Dim temp As String = str
temp = temp.Remove(temp.IndexOf("<body>"), 6)
temp = temp.Remove(temp.IndexOf("</body>"), 7)
Me.webRecv.DocumentText += "<br>" & str
End Sub
and
Private Sub s_OnImReceived(ByVal session As AccCoreLib.AccSession, ByVal
imSession As AccCoreLib.IAccImSession, ByVal sender As
AccCoreLib.IAccParticipant, ByVal im As AccCoreLib.IAccIm) Handles
s.OnImReceived
Dim str As String = im.GetConvertedText(decode)
str = str.Remove(str.IndexOf("<body>"), 6)
str = str.Remove(str.IndexOf("</body>"), 7)
Me.webrecv.DocumentText += "<br>" & str
End Sub
the bottom snippet works, the top one doesnt. the only thing different is
that the bottom one works directly in the event while the other snippet works
from a method called from that event.....all my objects and variables have a
value, these values are correct (after debugging it under every surcumstance
imaginable) i cant get the top snippet to work. im just curious why two
pieces of the same code dont work the same.....im using VB 2005 btw....ive
contacted the manufacturer of the SDK this is in to see if its a problem
there, so im also asking here to see if its something with my
code.....shouldnt these two snippets work the same? what am i missing? thanks
Public Sub ImRec(ByVal IM As IAccIm, ByVal Sender As IAccUser)
Dim str As String = IM.GetConvertedText(DECODE)
Dim temp As String = str
temp = temp.Remove(temp.IndexOf("<body>"), 6)
temp = temp.Remove(temp.IndexOf("</body>"), 7)
Me.webRecv.DocumentText += "<br>" & str
End Sub
and
Private Sub s_OnImReceived(ByVal session As AccCoreLib.AccSession, ByVal
imSession As AccCoreLib.IAccImSession, ByVal sender As
AccCoreLib.IAccParticipant, ByVal im As AccCoreLib.IAccIm) Handles
s.OnImReceived
Dim str As String = im.GetConvertedText(decode)
str = str.Remove(str.IndexOf("<body>"), 6)
str = str.Remove(str.IndexOf("</body>"), 7)
Me.webrecv.DocumentText += "<br>" & str
End Sub
the bottom snippet works, the top one doesnt. the only thing different is
that the bottom one works directly in the event while the other snippet works
from a method called from that event.....all my objects and variables have a
value, these values are correct (after debugging it under every surcumstance
imaginable) i cant get the top snippet to work. im just curious why two
pieces of the same code dont work the same.....im using VB 2005 btw....ive
contacted the manufacturer of the SDK this is in to see if its a problem
there, so im also asking here to see if its something with my
code.....shouldnt these two snippets work the same? what am i missing? thanks