   [.net] How to make it like a real one?
  Hi all,I have developed a client/server application using C# where server captures its own desktop image, break it into 16 equal segments,compares them with the previous segments stored image data.If updated then sends these updated segments one by one to the client.Client upon receiving these updated segments, updates its applicationpicture box respective regions.Problem is on client side they appear sequentially and it doesnt givethe effet of real time application.Can somebody give me idea how my client should update its areas that it looks like the whole image change at once.Thanx   
  Posting the SAME message over several forums is a VERY bad idea...   ;  Send a preliminary message that states the number of images to expect.  Once all expected images are recieved, redraw the recieved portions.  You can further extend the illusion of "all at once" by drawing everything to an offscreen buffer.  When ready, you bitblt/swap/whatever the offscreen buffer into the on-screen buffer and everything is updated at the same time.Oh, and don't cross-post.   ;  Thanx i will try it using Double buffering   ;  i hvae tried to use double buffering.I m using bitmap on client side to display but the prblemis that i couldnt get any idea how to combine my small chunks to make a complete desktop bitmap.Can anyone tell me how can i combine the arrived chunksinto a complete bitmap?;  Assuming that you are using a System.Drawing.Bitmap for your offscreen drawing buffer, the process is fairly simple.  Like falkone said, you'll probably want to wait until you've received all of the updated chunks to proceed, although this isn't necessary if you are carefull with your state data.  I would probably create a struct to hold the update portions, maybe:struct UpdateRegion {public System.Drawing.Point position;public System.Drawing.Bitmap chunk;public UpdateRegion(int x, int y, System.Drawing.Bitmap chunk) {this.position.X = x;this.position.Y = y;this.chunk = chunk;}};If you stored them using a System.Collections.Generic.List<UpdateRegion>, you could simply dothis.m_updateList.Add(new UpdateRegion(xpos, ypos, chunk));as the updated chunks come in.Once you have verified that you have received the full image delta update, you can then draw the chunks into the offscreen buffer and update your onscreen display:System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(this.m_drawBuffer);foreach (UpdateRegion update in this.m_updateList) {g.DrawImageUnscaled(update.chunk, update.position.X, update.position.Y, update.chunk.Width, update.chunk.Height);}g.Dispose();g = null;// Now you update your onscreen buffer, wherever it is.And, that should do the trick.-Dave   