|
VB.NET聊天程序(1)
'===================================================================== ' 文件: Wintalk.VB ' ' 摘要: 演示如何使用.net Framework library创建聊天程序. ' '===================================================================== Option EXPlicit On Option Strict On Imports System Imports System.IO Imports System.Text Imports System.Threading Imports System.net Imports System.net.Sockets Imports System.Drawing Imports System.Windows.Forms Imports Microsoft.VisualBasic Class App 'Entry point which delegates to C-style main Private Function Public Overloads Shared Sub Main() Main(System.Environment.GetCommandLineArgs()) End Sub ' Entry point Overloads Public Shared Sub Main(args() As String) ' If the args parse in known way then run the app If ParseArgs(args) Then ' Create a custom Talker object Dim talkerObj As New Talker(endPoint, client) ' Pass the object reference to a new form object Dim form As New TalkForm(talkerObj)
|