15,885,777 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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
Member 13336882
29-Oct-17 0:21am
View
oke...so now i'm using search button.Can you please assist me with some code ? and what happens when the user is done with searching and wants to go back to the main datagridview/datatable ? how to i cunfigure a button the clear the textbox as well as keep the checkbox's state and give me the original datagridview/dataview?(i mean the one that is not filtered/the one on startup)??
Member 13336882
29-Oct-17 0:17am
View
now,suppose i have multiple columns in my db/dgvw,so how do i configure the code to search in multiple columns ? e.g. i got 3 columns named [first name],[last name],gender..
Member 13336882
28-Oct-17 12:53pm
View
is there no other way sir?Other forums suggested me to study Dataview,defaultview and rowfilter.They said after studying these,i will be able to achieve my goal...Can u please explain how these three are related to my problem ?
Show More