views:

656

answers:

1

When I paste a picturebox that was copied, I get Parameter is not Valid.

The Picturebox that was copied has a valid image which displays just fine. The exception is coming from the undo engine of the surface designer.

Anyone have any idea whats going on?

+2  A: 

This forum http://www.codeguru.com/forum/showthread.php?t=445609 ran into a similar problem..That should help. If not, then this scenario shows that this answer work for them with that exact problem on this site: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/224ee2d0-4514-46b9-a6cd-073579b7e74e/

It says that The method used by DrawToBitmap is CopyFromScreen. There must be some problems in copying web pages from the screen to a bitmap, but if you use CopyFromScreen, which is supported, you shouldn't run into changes which break your code.

TStamper