Winsock. NEED HELP!
im totaly noob so describe so i understand...
You can get the old Winsock control from VB5 and 6. All you need to do is click Tools -> Choose Toolbox Items then click the COM tab and find "Microsoft Winsock Control" in the list and click the checkbox next to that. When I did this it appeared in the "Printing" section of the toolbox for some reason. Also, you can click Project -> Add Reference then select "Microsoft Winsock Control" and click OK. Then at the top of your code add this line:
Private
WithEvents Winsock As MSWinsockLib.WinsockUsing either of these methods will work the same.
Public
Class Form1 Private WithEvents AxWinsock As MSWinsockLib.Winsock Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickAxWinsock1.SendData(TextBox2.Text)
End Sub Private Sub AxWinsock1_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles AxWinsock1.DataArrival Dim strData As StringTextBox1.Text = TextBox1.Text & strData & vbNewLine
End SubEnd
Class=======================================================================
Well, Jackabee it helped now i got winsock control, but i wont get any messages, theres my code can you please tell where is my mistake?
hi,
this work in .framework 2.0 and who can i put this work in compact framework do you know another way?
thanks
bruno