I have made a program that show me in the systemtray how much emails did excist in my mailbox. The program is written in vb6, but i want to convert it to .NET

Of course I don't want to use the old WinSock, I want to work now with system.net.sockets, but I don't understand the receiving of data from .NET

Formaly I send my data with WinSock and get the received data with Winsock1.DataArrival, how can I do this with .NET? I already searched a much for using the .net.Sockets but a cannot get it, maybe I am to stupid :s

Please if someone can explain...

The mailcheck process is as below:


Connect with making use of .net.sockets to the pop3-server

the server replys
(how can i create a check if the server did reply?)

After getting te reply ma program have so send a command like "USER username"
(again get the server reply)

Send ma password like "PASS password"
(again get the server reply)

Send the "STAT"-command to receive the mail-count
Receive the number of e-mails in ma inbox and display Icon(number) in the systemtray

In VB6 my app works very fine, but I really want to convert it to .NET because of the new features of .NET

So if someone can help me....Please