Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I Used Winsock ActiveX Control In My Program . When I Publish And Run It , It Doesn't Start .
Can Anyone Please Check My Program Code?

VB
Public Class Form1

    Dim data As String



    Private Sub zucari_ConnectionRequest(sender As Object, e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles zucari.ConnectionRequest
        zucari.Close()
        zucari.Accept(e.requestID)

    End Sub

    Private Sub zucari_DataArrival(sender As Object, e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles zucari.DataArrival
        Dim data As String = ""
        zucari.GetData(data)
        TextBox2.Text = data
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        zucari.LocalPort = 4412
        zucari.Listen()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        zucari2.Close()
        zucari2.Connect(TextBox1.Text, 4412)
    End Sub

    Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
        Data = TextBox3.Text
        zucari.SendData(Data)
    End Sub
End Class


And I Use This ActiveX Control -
http://zetro-science.webs.com/[^](Click Download On The Website)
Posted
Comments
CHill60 18-Nov-13 11:13am    
I've seen some suspicious looking web sites in my time, but a page that just says "Download" without any explanation of what that might be ... yeah right.
TnTinMn 18-Nov-13 23:31pm    
Instead of trying to use a VB6 control with code that appears to be based on this(http://msdn.microsoft.com/en-us/library/aa733709%28v=vs.60%29.aspx), why not use the .Net libraries instead? For example code, see: http://msdn.microsoft.com/en-us/library/w89fhyex%28v=vs.110%29.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900