Click here to Skip to main content
15,885,777 members

Comments by Member 13336882 (Top 8 by date)

Member 13336882 7-Feb-18 6:28am View    
i don't get it...can u try the code urself and see if the result is the same
Member 13336882 7-Feb-18 6:26am View    
same result
Member 13336882 13-Jan-18 3:58am View    
Deleted
i fixed the code :

Class emailFolder
Public Property Title As String
End Class
Public Shared Sub Initialize()
client = New ImapClient("imap.gmail.com", True)
If Not client.Connect() Then
Throw New Exception("Error connecting to the client.")
End If
End Sub
Public Shared Function Login(ByVal u As String, ByVal p As String) As Boolean
Return client.Login(u, p)
End Function
Public Shared Sub Logout()
If client.IsAuthenticated Then
client.Logout()
End If
End Sub
Public Shared Function GetFolders() As List(Of emailFolder)
Dim folders = New List(Of emailFolder)()
For Each folder In client.Folders
folders.Add(New emailFolder With {.Title = folder.Name})
Next
client.Folders.Inbox.StartIdling()
AddHandler client.Folders.Inbox.OnNewMessagesArrived, AddressOf Inbox_OnNewMessagesArrived
Return folders
End Function
Private Shared Sub Inbox_OnNewMessagesArrived(ByVal sender As Object, ByVal e As IdleEventArgs)
MessageBox.Show($"A new message was downloaded in {e.Folder.Name} folder.")
End Sub
Public Shared Function GetMessagesForFolder(ByVal name As String) As MessageCollection
client.Folders(name).Messages.Download()
Return client.Folders(name).Messages
End Function

Now i get Null Reference Exception here :

Public Shared Function Login(ByVal u As String, ByVal p As String) As Boolean
Return client.Login(u, p)
End Function

Why ???????????????
Member 13336882 31-Oct-17 11:17am View    
this is the new code..not working :

Dim r As Integer, c As Integer
Dim bViz As Boolean = False
For c = 0 To userdatagrid.Columns.Count - 1
Select Case c
Case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ' whatever - the column indexes of those with string values
If userdatagrid.Rows(r).Cells(c).Value Like "*" & searcgcon.Text & "*" Then
bViz = True
Exit For
End If
Case Else

End Select
' ignore these columns

Next
Member 13336882 31-Oct-17 10:38am View    
getting this error : Operator 'Like' is not defined for type 'Byte()' and string "*a*".

I forgot to mention that the dgvw has an image column