pankaj.talk
May 1st, 2006, 01:51 AM
Hi,
I am trying to build a VB 6.0 project in Microsoft Studio 2005. It has automatically been converted to VB.Net.
I am now getting the following error...
error BC30057: Too many arguments to 'Public ReadOnly Default Property Chars(index As Integer) As Char
The problematic code is as below
Public ReadOnly Property Caption() As String
Get
'UPGRADE_NOTE: Left was upgraded to Left_Renamed. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
Dim Left_Renamed As String
'UPGRADE_NOTE: str was upgraded to str_Renamed. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
Dim str_Renamed As String
Dim lRet As Integer
str_Renamed = New String(vbNullChar, 255)
lRet = GetWindowText(mvarhWnd, str_Renamed, 255)
If (lRet = 0) Then
str_Renamed = ""
Else
' Clear out the extra characters off the end of the string.
str_Renamed = Left_Renamed(str_Renamed, lRet)
End If
Caption = str_Renamed
End Get
End Property
Of the above code, the below line is reporting the error.
str_Renamed = Left_Renamed(str_Renamed, lRet)
What can be done to resolve the same
Pankaj
I am trying to build a VB 6.0 project in Microsoft Studio 2005. It has automatically been converted to VB.Net.
I am now getting the following error...
error BC30057: Too many arguments to 'Public ReadOnly Default Property Chars(index As Integer) As Char
The problematic code is as below
Public ReadOnly Property Caption() As String
Get
'UPGRADE_NOTE: Left was upgraded to Left_Renamed. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
Dim Left_Renamed As String
'UPGRADE_NOTE: str was upgraded to str_Renamed. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
Dim str_Renamed As String
Dim lRet As Integer
str_Renamed = New String(vbNullChar, 255)
lRet = GetWindowText(mvarhWnd, str_Renamed, 255)
If (lRet = 0) Then
str_Renamed = ""
Else
' Clear out the extra characters off the end of the string.
str_Renamed = Left_Renamed(str_Renamed, lRet)
End If
Caption = str_Renamed
End Get
End Property
Of the above code, the below line is reporting the error.
str_Renamed = Left_Renamed(str_Renamed, lRet)
What can be done to resolve the same
Pankaj