Click here to Skip to main content
15,902,939 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Migration issue from VB6 to VB.Net [modified] Pin
Sree Nivas26-Dec-08 20:17
Sree Nivas26-Dec-08 20:17 
GeneralRe: Migration issue from VB6 to VB.Net Pin
Dave Kreskowiak27-Dec-08 5:49
mveDave Kreskowiak27-Dec-08 5:49 
QuestionCreate a folder with full Sharing Rights Pin
pdnet25-Dec-08 18:16
pdnet25-Dec-08 18:16 
AnswerRe: Create a folder with full Sharing Rights Pin
Khanna Gaurav26-Dec-08 3:40
Khanna Gaurav26-Dec-08 3:40 
AnswerRe: Create a folder with full Sharing Rights Pin
Dave Kreskowiak26-Dec-08 6:53
mveDave Kreskowiak26-Dec-08 6:53 
NewsGIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Pin
Shaguf Mohtisham25-Dec-08 17:39
Shaguf Mohtisham25-Dec-08 17:39 
GeneralRe: GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Pin
Dave Kreskowiak26-Dec-08 6:51
mveDave Kreskowiak26-Dec-08 6:51 
QuestionClient-Server Pin
Subjugate25-Dec-08 13:35
Subjugate25-Dec-08 13:35 
hey, guys i was wondering if anyone can help me debug this code as i have been trying for days and still have not find out the mistake i make. The portion which i have posted is one of the sub in my server application. I edited the code i found so that the server is able to reply to its client and after editing server do make the reply but with some bug. For the 1st request from the client, the reply is perfectly fine but subsequent request, the browser omit 2 front letters of the sentence and i don't understand why.Struck with this error with quite some time already.
Help will be greatly appreciated.






Private Sub doChat()
Dim infiniteCounter As Integer
Dim requestCount As Integer
Dim bytesFrom(10024) As Byte
Dim dataFromClient, DataToClient 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)

serverResponse = "ok"
sendBytes = System.Text.Encoding.ASCII.GetBytes(serverResponse)
networkStream.Write(bytesFrom, 0, serverResponse.Length)
msg("From Server - " + serverResponse)
DataToClient = networkStream.Read(sendBytes, 0, sendBytes.Length)
broadcast(dataFromClient, clNo, True)
broadcast(serverResponse, "Server", True)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Next
End Sub
AnswerRe: Client-Server Pin
Luc Pattyn25-Dec-08 14:54
sitebuilderLuc Pattyn25-Dec-08 14:54 
GeneralRe: Client-Server Pin
Subjugate25-Dec-08 15:34
Subjugate25-Dec-08 15:34 
GeneralRe: Client-Server Pin
Luc Pattyn25-Dec-08 15:45
sitebuilderLuc Pattyn25-Dec-08 15:45 
GeneralRe: Client-Server Pin
Subjugate25-Dec-08 15:55
Subjugate25-Dec-08 15:55 
QuestionChange text color when control is disabled vb.net Pin
~Khatri Mitesh~25-Dec-08 2:44
~Khatri Mitesh~25-Dec-08 2:44 
AnswerRe: Change text color when control is disabled vb.net Pin
Khanna Gaurav25-Dec-08 2:55
Khanna Gaurav25-Dec-08 2:55 
AnswerRe: Change text color when control is disabled vb.net Pin
Christian Graus25-Dec-08 16:21
protectorChristian Graus25-Dec-08 16:21 
GeneralRe: Change text color when control is disabled vb.net Pin
Jon_Boy26-Dec-08 5:06
Jon_Boy26-Dec-08 5:06 
GeneralRe: Change text color when control is disabled vb.net Pin
Nanda_MR25-Dec-08 17:14
Nanda_MR25-Dec-08 17:14 
Answersend sms from pc Pin
issa3325-Dec-08 1:37
issa3325-Dec-08 1:37 
GeneralRe: send sms from pc Pin
Christian Graus25-Dec-08 16:20
protectorChristian Graus25-Dec-08 16:20 
QuestionWindow state problem Pin
Pankaj Garg25-Dec-08 0:27
Pankaj Garg25-Dec-08 0:27 
AnswerRe: Window state problem Pin
Christian Graus25-Dec-08 0:29
protectorChristian Graus25-Dec-08 0:29 
QuestionRe: Window state problem Pin
Pankaj Garg25-Dec-08 1:15
Pankaj Garg25-Dec-08 1:15 
AnswerRe: Window state problem Pin
Christian Graus25-Dec-08 1:31
protectorChristian Graus25-Dec-08 1:31 
QuestionRe: Window state problem Pin
Pankaj Garg25-Dec-08 1:47
Pankaj Garg25-Dec-08 1:47 
QuestionDynamicly change MSN-Email adre that is shown to users ? Pin
DJMOH24-Dec-08 4:35
DJMOH24-Dec-08 4:35 

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.