0

Hello Friends,
I am converting VB 6 code to VB.Net in VS 2010, Framework 4.
I am unable to find equivalent code in VB.Net for
ListBox1.Items.Add(New VB6.ListBoxItem("Sam",0))
Error Message: "'Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem' is obsolete".
I tried "ListBox1.Items.Add(New ListItem("Sam",0))" but it is not working though I added
"Imports System.Windows.Forms.ListViewItem".
and
VB6.Format()
Error Message: "Public Function Format(Expression As Object, [Style As String = ""], [DayOfWeek As Microsoft.VisualBasic.FirstDayOfWeek = FirstDayOfWeek.Sunday], [WeekOfYear As Microsoft.VisualBasic.FirstWeekOfYear = FirstWeekOfYear.Jan1]) As String' is obsolete".
Eagerly waiting for an answer.
Regards,
Simran Kaur.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by codeorder
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.