Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioni want find a list of form of my application in code? Pin
combo_ci19-Apr-08 6:00
combo_ci19-Apr-08 6:00 
AnswerCross post... Ignore this thread. Pin
Dave Kreskowiak19-Apr-08 7:16
mveDave Kreskowiak19-Apr-08 7:16 
QuestionSaving a file Pin
Zak Hansen19-Apr-08 2:20
Zak Hansen19-Apr-08 2:20 
GeneralRe: Saving a file Pin
Luc Pattyn19-Apr-08 2:55
sitebuilderLuc Pattyn19-Apr-08 2:55 
QuestionProblems with TCPClient and TCPListener [modified] Pin
softwarejaeger19-Apr-08 0:11
softwarejaeger19-Apr-08 0:11 
GeneralRe: Problems with TCPClient and TCPListener Pin
Rob Smiley19-Apr-08 0:32
Rob Smiley19-Apr-08 0:32 
GeneralRe: Problems with TCPClient and TCPListener [modified] Pin
softwarejaeger19-Apr-08 1:58
softwarejaeger19-Apr-08 1:58 
GeneralRe: Problems with TCPClient and TCPListener Pin
Rob Smiley19-Apr-08 2:31
Rob Smiley19-Apr-08 2:31 
Hi softwarejaeger, it looks like the problem is in the User.Process method. Notice that the client.ReceiveBufferSize seems far to large for your message... the size is in fact an 8KB block, so you need to use the return value from Client.GetStream.Read before calling Send (just as you've done in Client.DoListen). Heres the modified code:

Dim Buffer(client.ReceiveBufferSize-1) As Byte
Dim i As Integer = Client.GetStream.Read(Buffer, 0, CInt(Client.ReceiveBufferSize))
MsgPack = System.Text.Encoding.ASCII.GetString(Buffer).ToString()
Send(System.Text.Encoding.ASCII.GetString(Buffer, 0, i))


A couple of other things: vb.net arrays are zero based and are defined by specifying the upper limit, not the array length - thats why i've added the -1 to the array dim.

Also, for all programmers sakes, please avoid using GoTo Dead | X| A While loop is a much more elegant way of looping through this method.

Good luck!
Rob

"An eye for an eye only ends up making the whole world blind"

GeneralRe: Problems with TCPClient and TCPListener Pin
softwarejaeger20-Apr-08 19:51
softwarejaeger20-Apr-08 19:51 
GeneralSending information between apps: code Pin
Jimilybibilybob18-Apr-08 23:17
Jimilybibilybob18-Apr-08 23:17 
GeneralRe: Sending information between apps: code Pin
Dave Kreskowiak19-Apr-08 4:22
mveDave Kreskowiak19-Apr-08 4:22 
GeneralDataRow Cast Exception Error Pin
Member 323293418-Apr-08 21:19
Member 323293418-Apr-08 21:19 
GeneralRe: DataRow Cast Exception Error Pin
Mycroft Holmes18-Apr-08 22:37
professionalMycroft Holmes18-Apr-08 22:37 
GeneralNeed help in Vb.net Pin
RameshMorasa18-Apr-08 21:16
RameshMorasa18-Apr-08 21:16 
GeneralRe: Need help in Vb.net Pin
Rajesh Anuhya18-Apr-08 21:27
professionalRajesh Anuhya18-Apr-08 21:27 
GeneralRe: Need help in Vb.net Pin
leckey19-Apr-08 5:11
leckey19-Apr-08 5:11 
GeneralOn screen keyboard code Pin
Jimilybibilybob18-Apr-08 11:28
Jimilybibilybob18-Apr-08 11:28 
GeneralRe: On screen keyboard code Pin
Christian Graus18-Apr-08 12:39
protectorChristian Graus18-Apr-08 12:39 
GeneralRe: On screen keyboard code Pin
Mycroft Holmes18-Apr-08 22:39
professionalMycroft Holmes18-Apr-08 22:39 
GeneralRe: On screen keyboard code Pin
Jimilybibilybob18-Apr-08 23:13
Jimilybibilybob18-Apr-08 23:13 
GeneralRe: On screen keyboard code Pin
Dave Kreskowiak19-Apr-08 4:14
mveDave Kreskowiak19-Apr-08 4:14 
GeneralRe: On screen keyboard code Pin
Jimilybibilybob19-Apr-08 4:33
Jimilybibilybob19-Apr-08 4:33 
GeneralAuto select in a text box Pin
sa_runner18-Apr-08 11:21
sa_runner18-Apr-08 11:21 
GeneralRe: Auto select in a text box Pin
Christian Graus18-Apr-08 12:47
protectorChristian Graus18-Apr-08 12:47 
GeneralRe: Auto select in a text box Pin
Thomas Stockwell18-Apr-08 14:31
professionalThomas Stockwell18-Apr-08 14:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.