Click here to Skip to main content
15,923,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: right click Pin
Christian Graus5-Oct-07 21:16
protectorChristian Graus5-Oct-07 21:16 
QuestionCreate Crystal Reports from Sql Server in VB.NET Pin
mhaneefa5-Oct-07 10:18
mhaneefa5-Oct-07 10:18 
QuestionTCP .Begin receive Pin
captainmogo5-Oct-07 7:32
captainmogo5-Oct-07 7:32 
AnswerRe: TCP .Begin receive Pin
Dave Kreskowiak5-Oct-07 8:18
mveDave Kreskowiak5-Oct-07 8:18 
GeneralRe: TCP .Begin receive Pin
captainmogo5-Oct-07 9:13
captainmogo5-Oct-07 9:13 
GeneralRe: TCP .Begin receive Pin
Dave Kreskowiak5-Oct-07 10:08
mveDave Kreskowiak5-Oct-07 10:08 
GeneralRe: TCP .Begin receive Pin
captainmogo5-Oct-07 10:23
captainmogo5-Oct-07 10:23 
GeneralRe: TCP .Begin receive Pin
Dave Kreskowiak5-Oct-07 10:36
mveDave Kreskowiak5-Oct-07 10:36 
captainmogo wrote:
it wont get all of it unless I loop it with .BeginReceive again. I have tried that in the past and still have not gotten it to work properly. The .BeginReceive never fires a second time.


This is because you have to setup another Async Begin Read at the end of your ReceiveCallback.
Private Sub ReceiveCallback(yada)
    yada, yada, yada
    ' Convert another chunk of the data to whatever you need...
    ' Invoke any control update methods you need...
 
    ' and last but not least, setup and fire off another BeginRead...
    StartAsyncRead()
End Sub

StartAsyncRead is where you create a State object and call the BeginRead method again.


captainmogo wrote:
I have 4 channels each of very different size but only 1 stateclass - so how do i adjust it to fit each channel.


The buffer size has to be big enough to hold either an entire message. OR the code breaking down the message into bytes has to fit as much as it can in the buffer and wait for another chance to send the next chunk. OR you leave it a variable size and ReDim the buffer to a known size defore you fill it. OR you could even just create 4 different size State classes.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionRich Text Box Pin
Socheat.Net5-Oct-07 6:42
Socheat.Net5-Oct-07 6:42 
AnswerRe: Rich Text Box Pin
Dave Kreskowiak5-Oct-07 8:13
mveDave Kreskowiak5-Oct-07 8:13 
GeneralRe: Rich Text Box [modified] Pin
Socheat.Net6-Oct-07 4:26
Socheat.Net6-Oct-07 4:26 
QuestionProject Guideline Pin
Sarfaraj Ahmed5-Oct-07 4:25
Sarfaraj Ahmed5-Oct-07 4:25 
AnswerRe: Project Guideline Pin
Dave Kreskowiak5-Oct-07 8:15
mveDave Kreskowiak5-Oct-07 8:15 
GeneralRe: Project Guideline Pin
Sarfaraj Ahmed6-Oct-07 17:38
Sarfaraj Ahmed6-Oct-07 17:38 
GeneralRe: Project Guideline Pin
Dave Kreskowiak7-Oct-07 3:01
mveDave Kreskowiak7-Oct-07 3:01 
GeneralRe: Project Guideline Pin
Sarfaraj Ahmed8-Oct-07 1:55
Sarfaraj Ahmed8-Oct-07 1:55 
GeneralRe: Project Guideline Pin
Dave Kreskowiak8-Oct-07 4:34
mveDave Kreskowiak8-Oct-07 4:34 
GeneralRe: Project Guideline Pin
Sarfaraj Ahmed8-Oct-07 23:08
Sarfaraj Ahmed8-Oct-07 23:08 
GeneralRe: Project Guideline Pin
Dave Kreskowiak9-Oct-07 1:46
mveDave Kreskowiak9-Oct-07 1:46 
QuestionCreating custom property like TextAlign,BorderStyle for runtimeControls Pin
VB 8.05-Oct-07 2:30
VB 8.05-Oct-07 2:30 
AnswerRe: Creating custom property like TextAlign,BorderStyle for runtimeControls Pin
visualhint5-Oct-07 4:16
visualhint5-Oct-07 4:16 
QuestionSend mail using gmail Pin
Soumyadipta5-Oct-07 2:03
Soumyadipta5-Oct-07 2:03 
AnswerRe: Send mail using gmail Pin
ESTAN6-Oct-07 5:19
ESTAN6-Oct-07 5:19 
GeneralRe: Send mail using gmail Pin
Soumyadipta10-Oct-07 19:23
Soumyadipta10-Oct-07 19:23 
Questionhow can i get back comumn data from Data Set Pin
Naveed7275-Oct-07 0:39
Naveed7275-Oct-07 0:39 

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.