reading gmail like this,
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim objClient As New System.Net.WebClient
Dim nodelist As XmlNodeList
Dim node As XmlNode
Dim response As String
Dim xmlDoc As New XmlDocument
Try
objClient.Credentials = New System.Net.NetworkCredential(UsernameTextBox.Text.Trim, PasswordTextBox.Text.Trim)
response = Encoding.UTF8.GetString(objClient.DownloadData("https://mail.google.com/mail/feed/atom"))
response = response.Replace("", "<feed>")
xmlDoc.LoadXml(response)
node = xmlDoc.SelectSingleNode("/feed/fullcount")
mailCount = node.InnerText 'Get the number of unread emails
If mailCount > 0 Then
ReDim emailFrom(mailCount - 1)
ReDim emailMessages(mailCount - 1)
nodelist = xmlDoc.SelectNodes("/feed/entry")
node = xmlDoc.SelectSingleNode("title")
For Each node In nodelist
emailMessages(tempCounter) = node.ChildNodes.Item(0).InnerText
emailFrom(tempCounter) = node.ChildNodes.Item(6).ChildNodes(0).InnerText
tempCounter += 1
Next
tempCounter = 0
End If
Me.Hide()
Form1.Show()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
//another form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
Me.Hide()
Me.ShowInTaskbar = False
Left = (SystemInformation.WorkingArea.Size.Width - Size.Width)
Top = (SystemInformation.WorkingArea.Size.Height - Size.Height)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Show()
If tempCounter >= mailCount Then
Timer1.Enabled = False
Me.Hide()
Else
lblFrom.Text = "From : " & emailFrom(tempCounter)
lblMessage.Text = "Subject : " & emailMessages(tempCounter)
tempCounter += 1
End If
End Sub
//glabalvariable.vb
Public emailFrom(1), emailMessages(1) As String
Public tempCounter As Int16 = 0
Public mailCount As Int16 = 0