Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 25-09-2008, 04:00 PM   #1 (permalink)
Right Off the Assembly Line
 
pavilion's Avatar
 
Join Date: Sep 2008
Posts: 12
Default CopyFromScreen method isn't affected by clipping region , why ??


I want to copy a portion of desktop screen and draw it on form (that portion can be in rectangular , elliptic or freeform shape ) , so I have to use a clipping region because the method just copy a rectangle portion from screen . Sound easy , I hope you understand
First I used APIs : SelectClipRgn and BitBlt , everything's done perfectly . Then I tried to make it in .NET way , use CopyFromScreen method and Graphics.SetClip . But it appear that the CopyFromScreen method isn't affected by clipping region . For example
Code:
 Graphics w = this.CreateGraphics;
w.SetClip(new Rectangle(0, 0, 100, 100);
w.CopyFromScreen(0, 0, 0, 0, new Size(500, 500));
You see, I copy a 500x500 rectangle from screen into a 100x100 clipping region , but the form still draw the 500x500 rectange ???
pavilion is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-10-2008, 07:10 PM   #2 (permalink)
Human Spambot
 
swatkat's Avatar
 
Join Date: Mar 2004
Location: India
Posts: 2,033
Default Re: CopyFromScreen method isn't affected by clipping region , why ??

I don't know anything related to .NET. But, Google lead me to this
http://www.dotnetcurry.com/ShowArtic...ookieSupport=1
Hope that helps....
__________________
http://swatrant.blogspot.com/
swatkat is offline  
Old 18-10-2008, 09:34 AM   #3 (permalink)
Right Off the Assembly Line
 
pavilion's Avatar
 
Join Date: Sep 2008
Posts: 12
Default Re: CopyFromScreen method isn't affected by clipping region , why ??

Thanks ^^ but it's not exactly my situation , the tutorial in that link doesn't use clipping region
pavilion is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stage6 was Hacked-All online movie site affected gopi_vbboy Chit-Chat 2 28-02-2008 08:54 AM
W810i Virus Affected dareprasanna Mobiles and Tablets 2 22-12-2007 12:06 AM
Affected by BackDoor.SdBot2.RMI redhat Software Q&A 10 30-03-2007 10:32 AM
is my pc affected by a virus??? abhishek_sharma Software Q&A 4 31-03-2006 09:28 AM
Is there a Correct method /way of using an ups? john_the_ultimate QnA (read only) 8 21-06-2005 10:29 PM

 
Latest Threads
- by clinton
- by soumya
- by Sujeet
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2