vb.net聊天程序 vbnet with

用VB 作个局域网聊天程序,怎么做?菜鸟就别考虑编vb.net聊天程序了
看看局域网聊天NetCall.实现局域网内(外)vb.net聊天程序的短信息传递vb.net聊天程序,为WinPopup的替代品 。在界面上下了工夫vb.net聊天程序 , 更会隐藏vb.net聊天程序,更能在老板眼底下使用 。有信息到达时整个界面变成红色以作提示 。
VB.NET中能否做一个像QQ那样的聊天框 , 可以输入文字和图片?第一个问题qq聊天室 必须能 用vb都可以做
第二个问题vb.net插入数学公式 可以把这些公式封装到一个类中vb.net聊天程序,调用就是vb.net聊天程序了
vb.net 怎样用UDP 协议 写一个聊天程序?。咳缤?/h2>'xiansr.2014/2/7 vb.net2010 调试通过
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim udpClient As New UdpClient(11000)
Try
udpClient.Connect("127.0.0.1", 11000)
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(RichTextBox1.Text)
udpClient.Send(sendBytes, sendBytes.Length)
Dim RemoteIpEndPoint As New IPEndPoint(IPAddress.Any, 0)
Dim receiveBytes As [Byte]() = udpClient.Receive(RemoteIpEndPoint)
Dim returnData As String = Encoding.ASCII.GetString(receiveBytes)
RichTextBox2.Text = "接收到vb.net聊天程序: "returnData.ToString()
'Debug.Print(("This message was sent from "RemoteIpEndPoint.Address.ToString()" on their port number "RemoteIpEndPoint.Port.ToString()))
udpClient.Close()
Catch ex As Exception
stop
End Try
End Sub
End Class
vb.net编写的聊天程序怎么不能传送汉字‘客户端向这样写:在窗体说放两个文本框、两个标签、两个按钮、一个列表框
Imports System.Net
Imports System.Net.Sockets
Imports System.IO
Imports System.Threading
Public Class Form1
'网络基础数据流
Private ns As NetworkStream
Private swriter As StreamWriter
Private nsread As StreamReader
Private tcpclient As TcpClient
Private tcpconnected As Boolean = False
Private clisocket As Socket
Private mythread As Thread
'发送
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Me.TextBox2.Text"" Then
swriter.WriteLine(Me.TextBox2.Text)
swriter.Flush()
Me.TextBox2.Text = ""
Else
MessageBox.Show("发送信息不能为空!", "错误提示")
End If
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'建立连连接
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim ipremote As IPAddress
Dim tcpclient As TcpClient
Try
ipremote = IPAddress.Parse(Me.TextBox1.Text)
Catch ex As Exception
MessageBox.Show("IP地址不合法!", "错误提示")
End Try
Try
tcpclient = New TcpClient(Me.TextBox1.Text, 8000)
ns = tcpclient.GetStream
swriter = New StreamWriter(ns)
Me.StatusBar1.Text = "已经连接上"
Me.Button2.Enabled = False
Me.Button1.Enabled = True
tcpconnected = True
Catch ex As Exception
MessageBox.Show("无法与远程8000端口建立连接!", "错误提示")
End Try
End Sub
Private Sub listen()
Try
Dim tcplistener As New TcpListener(IPAddress.Parse("127.0.0.1"), 8000)
tcplistener.Start()
tcpclient = tcplistener.AcceptTcpClient
ns = tcpclient.GetStream()
nsread = New StreamReader(ns)
While True
Dim msg As String = nsread.ReadLine
If msg = "stop" Then
tcplistener.Stop()
ns.Close()
nsread.Close()
mythread.Abort()
Else
Dim mytime As String = DateTime.Now.ToShortTimeString
Me.ListBox1.Items.Add(mytime""msg)
End If
End While
Catch ex As System.Security.SecurityException
MessageBox.Show("侦听失败!", "错误")
End Try
End Sub
End Class
【vb.net聊天程序 vbnet with】关于vb.net聊天程序和vbnet with的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读