Click here to Skip to main content
15,905,867 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to create a directory and set password to the created directory? Pin
Vikas Sashi20-Apr-08 4:40
Vikas Sashi20-Apr-08 4:40 
GeneralRe: how to create a directory and set password to the created directory? Pin
Christian Graus20-Apr-08 11:41
protectorChristian Graus20-Apr-08 11:41 
QuestionShell32.dll help please? Pin
portreathbeach20-Apr-08 4:40
portreathbeach20-Apr-08 4:40 
AnswerRe: Shell32.dll help please? Pin
portreathbeach20-Apr-08 11:32
portreathbeach20-Apr-08 11:32 
AnswerRe: Shell32.dll help please? Pin
Christian Graus20-Apr-08 11:40
protectorChristian Graus20-Apr-08 11:40 
GeneralRe: Shell32.dll help please? [modified] Pin
portreathbeach21-Apr-08 5:56
portreathbeach21-Apr-08 5:56 
GeneralRe: Shell32.dll help please? Pin
portreathbeach22-Apr-08 10:17
portreathbeach22-Apr-08 10:17 
QuestionT-SQL (VS) VB.NET Pin
Feras Mazen Taleb19-Apr-08 21:34
Feras Mazen Taleb19-Apr-08 21:34 
GeneralRe: T-SQL (VS) VB.NET Pin
Christian Graus20-Apr-08 11:33
protectorChristian Graus20-Apr-08 11:33 
GeneralApplication in languages other than english Pin
Meax19-Apr-08 21:21
Meax19-Apr-08 21:21 
GeneralRe: Application in languages other than english Pin
Rob Smiley20-Apr-08 0:25
Rob Smiley20-Apr-08 0:25 
AnswerRe: Application in languages other than english Pin
Andreas_Jonsson20-Apr-08 8:21
Andreas_Jonsson20-Apr-08 8:21 
Questioni need cod record sound in database access [modified] Pin
sarahsoso19-Apr-08 9:57
sarahsoso19-Apr-08 9:57 
GeneralRe: i need cod record sound in database access Pin
Dave Kreskowiak19-Apr-08 12:32
mveDave Kreskowiak19-Apr-08 12:32 
GeneralRe: i need cod record sound in database access Pin
leckey19-Apr-08 14:51
leckey19-Apr-08 14:51 
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 

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.