Results 1 to 2 of 2

Thread: winsock-vb.net

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2009
    Posts
    21

    winsock-vb.net

    i change that vb into vb.net.but there was no data arrival.
    please tell me wht is the error in this code?


    Private Sub Winsock12_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Winsock12.DataArrival
    Dim strdata As String
    Static intmessages As Integer
    Static intcurrentmessages As Integer
    Static strbuffer As String
    MsgBox("DATA 1IS ACCETED 11")
    Winsock12.GetData(strdata)
    TextBox4.Text = strdata



    If m_state = pop3_states.pop3_RETR Then
    MsgBox("DATA 1IS ACCETED ")
    Select Case m_state

    Case pop3_states.pop3_connect

    intmessages = 0

    m_state = pop3_states.pop3_USER

    MsgBox("connected")

    Winsock12.SendData("user " & txtusername.Text & vbCrLf)

  2. #2
    New Member
    Join Date
    Mar 2009
    Location
    Nairobi, Kenya
    Posts
    6

    Re: winsock-vb.net

    vb Code:
    1. Private Sub Winsock12_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Winsock12.DataArrival
    2. Dim strdata As String
    3. Static intmessages As Integer
    4. Static intcurrentmessages As Integer
    5. Static strbuffer As String
    6. MsgBox("DATA 1IS ACCETED 11")
    7. Winsock12.GetData(strdata)
    8. TextBox4.Text = strdata
    9.  
    10.  
    11.  
    12. If m_state = pop3_states.pop3_RETR Then
    13. MsgBox("DATA 1IS ACCETED ")
    14. Select Case m_state
    15.  
    16. Case pop3_states.pop3_connect
    17.  
    18. intmessages = 0
    19.  
    20. m_state = pop3_states.pop3_USER
    21.  
    22. MsgBox("connected")
    23.  
    24. Winsock12.SendData("user " & txtusername.Text & vbCrLf)

    Change it to

    vb Code:
    1. Private Sub Winsock12_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Winsock12.DataArrival
    2. Dim strdata As String
    3. Static intmessages As Integer
    4. Static intcurrentmessages As Integer
    5. Static strbuffer As String
    6. MsgBox("DATA 1IS ACCETED 11")
    7. Winsock12.GetData(strdata)
    8. TextBox4.Text = strdata
    9.  
    10.  
    11.  
    12. If m_state = pop3_states.pop3_RETR Then
    13. MsgBox("DATA 1IS ACCETED ")
    14. Select Case m_state
    15.  
    16. Case pop3_states.pop3_connect
    17.  
    18. intmessages = 0
    19.  
    20. m_state = pop3_states.pop3_USER
    21.  
    22. MsgBox("connected")
    23.  
    24. Winsock12.SendData("user " & txtusername.Text & vbCrLf)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width