Private Sub Command4_Click() Frame1.Visible = False ' The mailman object is used for receiving (POP3) ' and sending (SMTP) email. Dim mailman As New ChilkatMailMan2 mailman.UnlockComponent "UnlockCode" mailman.MailHost = txtPopserver.Text '"pop.gmail.com" mailman.PopUsername = txtpoplogin.Text mailman.PopPassword = txtpoppass.Text mailman.PopSsl = 1 ' Use this for gmail mailman.MailPort = 995 'Use this for gmail Dim bundle As ChilkatEmailBundle2 ' Copy the all email from the user's POP3 mailbox ' into a bundle object. The email remains on the server. Set bundle = mailman.CopyMail() If (bundle Is Nothing) Then MsgBox mailman.LastErrorText Exit Sub End If Dim i As Long Dim Str As String Dim LvItem As ListItem Dim email As ChilkatEmail2 Form2.ListView1.ListItems.Clear For i = 0 To bundle.MessageCount - 1 Set email = bundle.GetEmail(i) Set LvItem = Form2.ListView1.ListItems.Add LvItem.Text = email.From LvItem.SubItems(1) = email.subject LvItem.SubItems(2) = i Next mailman.Pop3EndSession Form2.Show 'Unload Me End Sub ----------------------------------------------------------------------------------- after converting it to vb.net ----------------------------------------------------------------------------------- Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click GroupBox3.Visible = False ' The mailman object is used for receiving (POP3) ' and sending (SMTP) email. Dim mailman As New CHILKATMAILLib2.ChilkatMailMan2 mailman.UnlockComponent("UnlockCode") mailman.MailHost = TextBox10.Text '"pop.gmail.com" mailman.PopUsername = TextBox12.Text mailman.PopPassword = TextBox11.Text mailman.PopSsl = 1 ' Use this for gmail mailman.MailPort = 995 'Use this for gmail Dim bundle As CHILKATMAILLib2.ChilkatEmailBundle2 ' Copy the all email from the user's POP3 mailbox ' into a bundle object. The email remains on the server. bundle = mailman.CopyMail() If (bundle Is Nothing) Then MsgBox(mailman.LastErrorText) Exit Sub End If Dim i As Integer 'UPGRADE_NOTE: Str was upgraded to Str_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"' Dim LvItem As System.Windows.Forms.ListViewItem Dim email As CHILKATMAILLib2.ChilkatEmail2 Form2.ListView1.Items.Clear() For i = 0 To bundle.MessageCount - 1 email = bundle.GetEmail(i) 'UPGRADE_ISSUE: MSComctlLib.ListItems method ListView1.ListItems.Add was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"' LvItem = Form2.ListView1.Items.Add() LvItem.Text = email.From 'UPGRADE_WARNING: Lower bound of collection LvItem has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' If LvItem.SubItems.Count > 1 Then LvItem.SubItems(1).Text = email.subject Else LvItem.SubItems.Insert(1, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, email.subject)) End If 'UPGRADE_WARNING: Lower bound of collection LvItem has changed from 1 to 0. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A3B628A0-A810-4AE2-BFA2-9E7A29EB9AD0"' If LvItem.SubItems.Count > 2 Then LvItem.SubItems(2).Text = CStr(i) Else LvItem.SubItems.Insert(2, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, CStr(i))) End If Next mailman.Pop3EndSession() Form2.Show() End Sub --------------
LvItem = Form2.ListView1.Items.Add()
Error 1 Overload resolution failed because no accessible 'Add' accepts this number of arguments
Add
ListView
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)