Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / April 2004

Tip: Looking for answers? Try searching our database.

how to deal with this repaint case?(on remote screen transmit)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
?????????? - 11 Apr 2004 13:20 GMT
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 ?

THX!
Michael Giagnocavo [MVP] - 13 Apr 2004 23:26 GMT
You should create a backing store on the client, say a bitmap. This bitmap
stores the "screen". When new pieces of the screen come in, you paint them
to the form AND the bitmap. OnPaint, you paint the entire bitmap.

-mike
MVP

>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.
[quoted text clipped - 21 lines]
>
> THX!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.