˹á
 úҹ
  C/C++ new
  Java new
 Sourcecode.TV
  Android
  Blackberry
  C/C++
  Java
  Linux
  Windows Phone
  ͧͧ
 
  .NET
  Android
  Blackberry
  C++Builder
  Delphi
  Java
  Mobile
  Open Source
  Pocket PC
  Visual Basic
  Web
  Windows Phone
  Others
 Ẻ¹
  ASP
  ASP.NET Webmatrix
  C++
  eVB
  J2ME
  Java
  PHP
 
  Android
  ASP
  C++
  VC++
  CGI-Perl
  Delphi
  Java
  jQuery
  PHP
  Visual Basic
  .NET
 ԡèҡ
  Դ...
  DoodeeHosting
  Ѻ͡Ẻ Ѳ䫵
  Freeware
  ѵҤɳ
  ª١
  ʶԵԼ
 Ŵ
 Ң
 дҹʹ
  .NET
  C/C++
  Delphi
  Java
  Palm/PocketPC
  Visual Basic
  Web
 
 дҹҹ
 ԧ
 ǡѺ
 ѵҤɳ
Social Network

Facebook  Twitter  YouTube
 New Article
 Webboard
 Freelanceboard
Freeware
 (BerDee)
(Android)
駩غ
駩غ(Android)
WebcamMonitor
WebcamMonitor(Windows)
scSendMail
scSendMail(Windows)
MSN Caption
MSN Caption(Windows)
  Freelance comment
  ԴͺʹФѺ...
2015-07-29 13:35:58
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:33:54
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:32:51
  ԴͺФѺ
ҹ...

2014-01-06 12:47:38
  ѧҤ͹ ͧ֡ͧ...
2013-07-06 01:04:37
  ʹ觢ͺࢵҤҤҡ͹ФѺ...
2013-03-24 18:54:20
  ѧդѺҹԴѺ 08...
2012-12-16 19:18:14
  ʹ㨤 Դ 0905076277...
2012-11-12 11:07:46
  Ѻ礹ѡ֡ͺѷ
...

2012-10-29 03:10:46
  sukit_te34@hotmail.com...
2012-10-29 03:09:36
  Webboard comment
  ͧ gotoxy ѧ...
2017-08-28 11:45:52
  ͧҧա u...
2017-08-27 20:09:01
  #define GLUT_DISABLE_ATEXIT...
2017-08-27 12:53:17
  դԻ͹ ...
2017-08-27 10:50:02
  Ѻ ͹ matlab ¹ matlab...
2017-06-03 16:27:23
  ੾зҧҴ ͧҢ...
2017-05-25 16:18:08
  ͧ˹Ѻ os ...
2017-05-25 16:12:47
  ¹ php curl ...
2017-04-20 01:04:20
  ¹ ...
2017-03-27 12:50:54
  ʧҷ ͧѾഷ...
2017-03-27 12:37:20
  Homework comment
  ͺسҡѺ...
2017-08-16 18:27:25
  ͧ ͧ ѧ ^^...
2017-04-18 18:40:46
  ͧ ͧ ѧ ^^...
2017-04-18 18:37:54
  á flowchart ѹ...
2017-04-18 17:43:33
  ҡ flowchart ...
2017-04-18 16:25:29
  kungking ӶäѺ ?...
2017-03-18 23:28:36
  ¹ʴͧ...
2017-03-06 10:56:25
  鴷ӧҹẺ ...
2016-09-06 01:00:12
  ҡҺ鴹Ѻѧ...
2016-09-05 09:31:27
  ͧ֡¹...
2016-04-22 00:47:49
  Article comment
  [b] , ...
2017-10-20 10:05:06
  [b]5 ...
2017-10-18 08:19:17
  - ...
2017-10-18 07:17:11
  [b] ...
2017-10-18 06:07:31
  [b] 96 ...
2017-10-18 06:05:28
  - ...
2017-10-18 05:49:56
  code ͧ VB ú...
2017-09-28 16:50:02
  ҨѺ ͧ
...

2017-07-11 09:59:35
  ö͡Ѻ anycast ...
2017-07-05 10:12:35
  Ѻ س "Դ" ͧ֡...
2016-06-18 15:21:09
  9Mcode comment
  ҡ...
2014-02-21 08:52:19

Link Exchange

ѵҤɳ
Statistics of Sourcecode in Thailand
 
 Webboard

- - - - - - - - - - - - - - ʹѺʹع- - - - - - - - - - - - - -

з #3515 [Vb]

ŧ Console Windows Form դѺ VB2008

Imports System.Net.Sockets
Imports System.Text
Module Module1
Dim clientsList As New Hashtable
Sub Main()
Dim serverSocket As New TcpListener(1234)
Dim clientSocket As TcpClient
Dim infiniteCounter As Integer
Dim counter As Integer
serverSocket.Start()
msg("Chat Server Started ....")
counter = 0
infiniteCounter = 0
For infiniteCounter = 1 To 2
infiniteCounter = 1
counter += 1
clientSocket = serverSocket.AcceptTcpClient()

Dim bytesFrom(10024) As Byte
Dim dataFromClient As String

Dim networkStream As NetworkStream = _
clientSocket.GetStream()
networkStream.Read(bytesFrom, 0, CInt(clientSocket.ReceiveBufferSize))
dataFromClient = System.Text.Encoding.ASCII.GetString(bytesFrom)
dataFromClient = _
dataFromClient.Substring(0, dataFromClient.IndexOf("$"))

clientsList(dataFromClient) = clientSocket

broadcast(dataFromClient + " Joined ", dataFromClient, False)

msg(dataFromClient + " Joined chat room ")
Dim client As New handleClinet
client.startClient(clientSocket, dataFromClient, clientsList)
Next
clientSocket.Close()
serverSocket.Stop()
msg("exit")
Console.ReadLine()
End Sub

Sub msg(ByVal mesg As String)
mesg.Trim()
Console.WriteLine(" >> " + mesg)
End Sub
Private Sub broadcast(ByVal msg As String, ByVal uName As String, ByVal flag As Boolean)
Dim Item As DictionaryEntry
For Each Item In clientsList
Dim broadcastSocket As TcpClient
broadcastSocket = CType(Item.Value, TcpClient)
Dim broadcastStream As NetworkStream = _
broadcastSocket.GetStream()
Dim broadcastBytes As [Byte]()

If flag = True Then
broadcastBytes = Encoding.ASCII.GetBytes(uName + " says : " + msg)
Else
broadcastBytes = Encoding.ASCII.GetBytes(msg)
End If

broadcastStream.Write(broadcastBytes, 0, broadcastBytes.Length)
broadcastStream.Flush()
Next
End Sub

Public Class handleClinet
Dim clientSocket As TcpClient
Dim clNo As String
Dim clientsList As Hashtable

Public Sub startClient(ByVal inClientSocket As TcpClient, _
ByVal clineNo As String, ByVal cList As Hashtable)
Me.clientSocket = inClientSocket
Me.clNo = clineNo
Me.clientsList = cList
Dim ctThread As Threading.Thread = New Threading.Thread(AddressOf doChat)
ctThread.Start()
End Sub

Private Sub doChat()
Dim infiniteCounter As Integer
Dim requestCount As Integer
Dim bytesFrom(10024) As Byte
Dim dataFromClient As String
Dim sendBytes As [Byte]()
Dim serverResponse As String
Dim rCount As String
requestCount = 0
For infiniteCounter = 1 To 2
infiniteCounter = 1
Try
requestCount = requestCount + 1
Dim networkStream As NetworkStream = _
clientSocket.GetStream()
networkStream.Read(bytesFrom, 0, CInt(clientSocket.ReceiveBufferSize))
dataFromClient = System.Text.Encoding.ASCII.GetString(bytesFrom)
dataFromClient = _
dataFromClient.Substring(0, dataFromClient.IndexOf("$"))
msg("From client - " + clNo + " : " + dataFromClient)
rCount = Convert.ToString(requestCount)

broadcast(dataFromClient, clNo, True)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Next
End Sub

End Class
End Module


úǹ¤Ѻ
ҡس : ѡ¹֡Ѵ [2014-07-04 20:36:20]  

101.108.26.112 Դ #29062 (ҡ IP: 101.108.26.112)
"ѡ¹֡Ѵ" ѴͧѺ

ԸաäШҡ Sub main ҷúҧ ¡úҧ
ǹ˹ 仡ӡ͡Ẻ˹ҵҢͧ Window Form ǡ˹͡ Control Event ¡ǹӧҹ

ѡҹ
ҡس : maddog [2014-07-05 02:57:40]

171.98.38.182 Դ #29063 (ҡ IP: 171.98.38.182)
س "maddog" º͡˹Ѻǹ˹ͧ괷͡ console ФѺ
ҡس : ѡ¹֡Ѵ [2014-07-05 11:08:07]

103.5.27.23 Դ #29064 (ҡ IP: 103.5.27.23)
Ҥسҧ Project console Ҥس Run ӧҹ Sub Main()

Ҥسҧ Project Windows form ÷ӧҹ 繿ѡ (Ҥسҧáտ)

ѭҢͧس ͧ㨡÷ӧҹͧ console ŧҷӧҹ window form
ҡس : maddog [2014-07-05 15:23:59]

171.98.38.182 Դ #29065 (ҡ IP: 171.98.38.182)
͸Ժ˹Ѻ ç Byte ҡ ǡ ǡ "System.Text.Encoding.ASCII.GetString" ѹѹ console ҤѺ Ǿǡ
.Read ѹ˹ҷҨ᷹ѹѺ ػͧŧѹʴ᷹ͤʴ console ҹ鹤Ѻ ҡسҼ˹ª͸ԺǹӤѭ˹Ѻ 繾Фسҡ¤Ѻ 3 ѹ ѹԧѺ
ҡس : ѡ¹֡Ѵ [2014-07-05 18:01:06]

125.24.163.234 Դ #29066 (ҡ IP: 125.24.163.234)
ҡӶҺҾ鹰ҹس蹤Ѻ й˹ѧҹѺ

"System.Text.Encoding.ASCII.GetString" .net framework ѧ仹
.NET Framework
Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
Ũҡ http://msdn.microsoft.com/en-us/library/744y86tc(v=vs.110).aspx

.read ҹŨҡ network س "᷹" ?? 仴 ͧҧ project ͧѺ .net 㴺ҧ֧ͧѺ ͧ֡ҢŹ http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.read.aspx


Console.WriteLine(" >> " + mesg) س¹ MessageBox.Show(" >> " + mesg)
ҡس : maddog [2014-07-05 23:51:38]

103.5.27.65 Դ #29067 (ҡ IP: 103.5.27.65)
ա觹֧ 㨡 鴷سҹ Module Module1 .... 觶 س new project Ẻ windows Ƿӡ new module ǡ ͺ鴹

ҡ鹡ͧ¹鴨ҡǹͧ windows ͧ¡ function methode ö¡ҹ

ͧ٤Ѻ
ҡس : maddog [2014-07-06 15:24:19]

171.98.38.182 Դ #29068 (ҡ IP: 171.98.38.182)
괹 Chat Server Ѻ ͧ Client öáѹ Console Windows Form Not Responding Client üҹ Server 黡 ͧдٷк÷Ѵ Դ Sub Main ФѺ Windows Form ҧǡ Not Responding ǡͶԴ֧Ѻ<br><br>Private Sub broadcast(ByVal msg As String, ByVal uName As String, ByVal flag As Boolean)<br><br>Dim Item As DictionaryEntry<br>For Each Item In clientsList<br>Dim broadcastSocket As TcpClient<br>broadcastSocket = CType(Item.Value, TcpClient)<br>Dim broadcastStream As NetworkStream = _<br>broadcastSocket.GetStream()<br>Dim broadcastBytes As [Byte]()<br><br>If flag = True Then<br>broadcastBytes = Encoding.ASCII.GetBytes(uName + \
ҡس : ѡ¹֡Ѵ [2014-07-06 19:50:58]

171.98.38.182 Դ #29069 (ҡ IP: 171.98.38.182)
ҡ괢ҧ ҨдͧФѺ괵ç Private Sub broadcast ФѺ ѹҨ괷Ѻͤҡҧ Client ʴ Console Server ФѺ Ƿչзѧѹ ʴͤ TextBox դѺ
ҡس : ѡ¹֡Ѵ [2014-07-06 19:56:28]

101.108.3.133 Դ #29070 (ҡ IP: 101.108.3.133)
ҼԴФѺ ǹʴͤ Sub msg

ͧ-----------------------------
Sub msg(ByVal mesg As String)
mesg.Trim()

Textbox1.text = Textbox1.text + ">>" + mesg + "\n"
End Sub
ҡس : maddog [2014-07-06 20:27:06]
ͺз
´

- - - - - - - - - - - - - - ʹѺʹع- - - - - - - - - - - - - -

 
 
µͨ Ѻͧ macbook pro 2016 (usb-c to HDMI)
µͨ Ѻͧ macbook pro 2016 (usb-c to HDMI) ´дѺ 4K
ŧ Mini DisplayPort to HDMI Adapter ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini
ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini
µٿѧ Ъ Ѻ iPhone 7  7 Plus
µٿѧ Ъ Ѻ iPhone 7 7 Plus
ŧҡ USB-C Type  USB 3.1 Ѻ MacBook
ŧҡ USB-C Type USB 3.1 Ѻ MacBook
䢤ǧѺͧ Macbook Air/Pro
䢤ǧ Ѻͧ Macbook Air/Pro (300ҷ)
HDMI  3 ͡  1
HDMI 3 ͡ 1 (350ҷ)
Ի͹¹
¹¹ͷ
¹¹͹´
¹¹
¹¹ վʾ
¹¹
¹ҹԹء
¹¹Թ⿹
¹¹Ϊ ʤ
9M Blog ͧ͡ ¹ͧ
ԡ ҾѺԭ
OrmSin.com: ˹ѧͧҹ--չ (country crafts)
ѵҤɳ
 
Tutorial
eVB Tutorial
ASP.NET Webmatrix Tutorial
J2ME Tutorial
C++  Tutorial
Java  Tutorial
PHP Tutorial
ASP Tutorial
 
ẺǨ
Freelance ѺѲ

Home - Article - Tutorial - Sourcecode - Dev Handbook - Search - WebBoard - Links - About Us

ʧǹԢԷ Ѵ͡ ӫ Ѵŧ ٻẺ Ѻ͹حҵѡɳѡ
Ţ¹ҳԪ硷͹ԡҡзǧҳԪ: 7100503002000
Copyright 2001 SourceCode.in.th