右键>>添加>>还是没找到!
哪位能帮我详细说说怎么弄!
才学!:::不好意思!
9 个解决方案
#1
右击工具箱,选择自定义工具,然后选择 microsoft winsock ... 勾上就行了啊
#2
我是这样!!
但是好像没有!!
晕!
但是好像没有!!
晕!
#3
谢谢先!
#4
右击工具箱,选择自定义工具,注意挣大眼睛仔细的找,这里的部件可不少,不小心的话是有可能找不到!
#5
寒 …… 楼上的所有的 ……
Socket 不就在 system.net 下面么 ??
Socket 不就在 system.net 下面么 ??
#6
很久以前我写的 ……
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading
Imports System.Net.Sockets
.............................................
Protected Sub SendMessage()
Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
Dim NewThread As Thread
Dim Client As TcpClient
Dim InBuff(600) As Byte
Try
NewThread = System.Threading.Thread.CurrentThread
Client = New TcpClient
Try
Client.Connect(RemoteIP, 5678)
Catch e As System.Net.Sockets.SocketException
MessageBox.Show(errTimeout, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Exit Sub
End Try
Dim writer As New IO.StreamWriter(Client.GetStream, System.Text.Encoding.Default)
writer.Write("#MESSAG#|" & MacAdd & "|" & cbSMS.Checked.ToString & "|" & txtTitle.Text & "|" & txtSend.Text)
writer.Flush()
While Not Client.GetStream.DataAvailable()
Application.DoEvents()
End While
Dim strRec As String
If Client.GetStream.DataAvailable() Then
Client.GetStream().Read(InBuff, 0, InBuff.Length)
strRec = System.Text.Encoding.Default.GetString(InBuff).Trim
End If
If strRec.Substring(0, 8) = "#MSGACC#" Then
MessageBox.Show("Report has been send to the FIS team .", "Message Send Success", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
txtSend.Text = ""
txtTitle.Text = ""
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
End If
Client.Close()
Catch ex As Exception
MessageBox.Show(errGeneral, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Finally
Me.Cursor = System.Windows.Forms.Cursors.Default
End Try
End Sub
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading
Imports System.Net.Sockets
.............................................
Protected Sub SendMessage()
Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
Dim NewThread As Thread
Dim Client As TcpClient
Dim InBuff(600) As Byte
Try
NewThread = System.Threading.Thread.CurrentThread
Client = New TcpClient
Try
Client.Connect(RemoteIP, 5678)
Catch e As System.Net.Sockets.SocketException
MessageBox.Show(errTimeout, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Exit Sub
End Try
Dim writer As New IO.StreamWriter(Client.GetStream, System.Text.Encoding.Default)
writer.Write("#MESSAG#|" & MacAdd & "|" & cbSMS.Checked.ToString & "|" & txtTitle.Text & "|" & txtSend.Text)
writer.Flush()
While Not Client.GetStream.DataAvailable()
Application.DoEvents()
End While
Dim strRec As String
If Client.GetStream.DataAvailable() Then
Client.GetStream().Read(InBuff, 0, InBuff.Length)
strRec = System.Text.Encoding.Default.GetString(InBuff).Trim
End If
If strRec.Substring(0, 8) = "#MSGACC#" Then
MessageBox.Show("Report has been send to the FIS team .", "Message Send Success", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
txtSend.Text = ""
txtTitle.Text = ""
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
End If
Client.Close()
Catch ex As Exception
MessageBox.Show(errGeneral, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Finally
Me.Cursor = System.Windows.Forms.Cursors.Default
End Try
End Sub
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
#7
再没有的话选择com组件标签,肯定能找到,不过使用时可能设计到与com组件交互的问题,要知道net组件与com组件差别可大了。
#8
谢谢!!
一会这么多帖了:)
一会这么多帖了:)
#9
在com组建中有的,不过如果没装vb6的话是不能用的,你也可以在vs.net的第二张盘里面找到
extras\vb6controls\vb6control点击运行会完成注册表的注册,这样就可以用了
extras\vb6controls\vb6control点击运行会完成注册表的注册,这样就可以用了
#1
右击工具箱,选择自定义工具,然后选择 microsoft winsock ... 勾上就行了啊
#2
我是这样!!
但是好像没有!!
晕!
但是好像没有!!
晕!
#3
谢谢先!
#4
右击工具箱,选择自定义工具,注意挣大眼睛仔细的找,这里的部件可不少,不小心的话是有可能找不到!
#5
寒 …… 楼上的所有的 ……
Socket 不就在 system.net 下面么 ??
Socket 不就在 system.net 下面么 ??
#6
很久以前我写的 ……
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading
Imports System.Net.Sockets
.............................................
Protected Sub SendMessage()
Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
Dim NewThread As Thread
Dim Client As TcpClient
Dim InBuff(600) As Byte
Try
NewThread = System.Threading.Thread.CurrentThread
Client = New TcpClient
Try
Client.Connect(RemoteIP, 5678)
Catch e As System.Net.Sockets.SocketException
MessageBox.Show(errTimeout, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Exit Sub
End Try
Dim writer As New IO.StreamWriter(Client.GetStream, System.Text.Encoding.Default)
writer.Write("#MESSAG#|" & MacAdd & "|" & cbSMS.Checked.ToString & "|" & txtTitle.Text & "|" & txtSend.Text)
writer.Flush()
While Not Client.GetStream.DataAvailable()
Application.DoEvents()
End While
Dim strRec As String
If Client.GetStream.DataAvailable() Then
Client.GetStream().Read(InBuff, 0, InBuff.Length)
strRec = System.Text.Encoding.Default.GetString(InBuff).Trim
End If
If strRec.Substring(0, 8) = "#MSGACC#" Then
MessageBox.Show("Report has been send to the FIS team .", "Message Send Success", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
txtSend.Text = ""
txtTitle.Text = ""
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
End If
Client.Close()
Catch ex As Exception
MessageBox.Show(errGeneral, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Finally
Me.Cursor = System.Windows.Forms.Cursors.Default
End Try
End Sub
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading
Imports System.Net.Sockets
.............................................
Protected Sub SendMessage()
Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
Dim NewThread As Thread
Dim Client As TcpClient
Dim InBuff(600) As Byte
Try
NewThread = System.Threading.Thread.CurrentThread
Client = New TcpClient
Try
Client.Connect(RemoteIP, 5678)
Catch e As System.Net.Sockets.SocketException
MessageBox.Show(errTimeout, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Exit Sub
End Try
Dim writer As New IO.StreamWriter(Client.GetStream, System.Text.Encoding.Default)
writer.Write("#MESSAG#|" & MacAdd & "|" & cbSMS.Checked.ToString & "|" & txtTitle.Text & "|" & txtSend.Text)
writer.Flush()
While Not Client.GetStream.DataAvailable()
Application.DoEvents()
End While
Dim strRec As String
If Client.GetStream.DataAvailable() Then
Client.GetStream().Read(InBuff, 0, InBuff.Length)
strRec = System.Text.Encoding.Default.GetString(InBuff).Trim
End If
If strRec.Substring(0, 8) = "#MSGACC#" Then
MessageBox.Show("Report has been send to the FIS team .", "Message Send Success", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
txtSend.Text = ""
txtTitle.Text = ""
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
End If
Client.Close()
Catch ex As Exception
MessageBox.Show(errGeneral, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
panStats.Visible = False
txtSend.Enabled = True
btnSend.Enabled = True
txtTitle.Enabled = True
Finally
Me.Cursor = System.Windows.Forms.Cursors.Default
End Try
End Sub
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
#7
再没有的话选择com组件标签,肯定能找到,不过使用时可能设计到与com组件交互的问题,要知道net组件与com组件差别可大了。
#8
谢谢!!
一会这么多帖了:)
一会这么多帖了:)
#9
在com组建中有的,不过如果没装vb6的话是不能用的,你也可以在vs.net的第二张盘里面找到
extras\vb6controls\vb6control点击运行会完成注册表的注册,这样就可以用了
extras\vb6controls\vb6control点击运行会完成注册表的注册,这样就可以用了