Re: how to solve this OnPaint problem ? ( about remote screen transmit )
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 04/11/04
- Next message: Patrick: "Re: J# dll problem"
- Previous message: Din鏴r: "Urgent date question"
- In reply to: 微软新闻组: "how to solve this OnPaint problem ? ( about remote screen transmit )"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 11 Apr 2004 20:36:43 +0100
微软新闻组 <fpe2000@163.net> wrote:
> i want to abtain remote screen capture on the pc in LAN.
> i was suggested to transmit the changed parts only to save the bandwidth.
> so i divide the screen into 10*10 parts. and now , i need to display the
> remote screen on my own form. my method is use this:
>
> Graphics c = this.createGraphics();
> c.drawImage(imageparts,xcoodinary,ycoodinary);// imageparts is ONE part
> // of the screen (1/100)
>
> whenever i receive a imageparts, i use the code above to draw the changed
> screen parts on a FORM. the code seems to work well.In the first time,i
> should call this code 100 times to get the original screen.after then , i
> could only call this code several times.
>
> but now ,when the FORM is changed or covered by other windows , with the
> repaint result ,the image disappeared or changed into a wrong display.
>
> So i should put the code above into OnPaint method. but the code above only
> redraws the changed parts of the remote screen, the others disappeared.
>
> How can i redraw the previous unchanged image already on the FORM ? OR are
> there other methods to solve this problem ?
You'll need to store all of the 100 parts in memory, and redraw
whichever bits of the screen are being repainted.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Patrick: "Re: J# dll problem"
- Previous message: Din鏴r: "Urgent date question"
- In reply to: 微软新闻组: "how to solve this OnPaint problem ? ( about remote screen transmit )"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|