vbFromUnicode vb6 to .net problems

druss

Member
Joined
Apr 1, 2004
Messages
9
i converted a program to from vb6 to .net recently and i got the error message "vbFromUnicode is not declared" im not sure but i dont think vbFromUnicode needs to be declared.

i am new to .net and vb6 and i code the program from an open source one so i can learn more about the code.

This is the line were i am getting the problem, i also included the microsoft error message with it after converting.

Code:
                        UPGRADE_ISSUE: Constant vbFromUnicode was not upgraded. Click for more: ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2070"
                        UPGRADE_TODO: Code was upgraded to use System.Text.UnicodeEncoding.Unicode.GetBytes() which may not have the same behavior. Click for more: ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1059"
                        bTag = System.Text.UnicodeEncoding.Unicode.GetBytes(StrConv(sTag, vbFromUnicode))
                        For j = LBound(bTag) To UBound(bTag)
                            b(lSize + 10 + j) = bTag(j)
                        Next j

can someone tell me what to modify in order to make this work??

Thanks alot
Goran
 
Try removing the StrConv call altogether, thus:

bTag = System.Text.UnicodeEncoding.Unicode.GetBytes(sTag)
 
Back
Top