Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 11th, 2006, 07:31 PM
Authorized User
 
Join Date: May 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Clear the Clipboard

Hi! I am working on a program that takes a screenshot (putting that in the clipboard), puts that into an image box and analyzes it then does the process over and over again. As the program runs my RAM basically ducks for cover and hides because the big hungry images or screenshots do not go away until the program is finished gobiling up the RAM regardless of what it tries to do. So my question is: how do I clear the clipboard? I have been searching around the internet for sometime and I want to be very specific, I am working with Visual Basic . NET 2003 Professional Edition. I cannot simple type ClipBoard.Clear, that is not supported past VB 6. I have found these steps though:

1. PInvoke and call OleSetClipboard API from ole32.dll or
2. Use PInvoke and call the following sequence of methods declared in
user32.dll
OpenClipboard
EmptyClipboard
CloseClipboard

Is this somehow calling the old VB6 interface and working with the clipboard that way? If so what does PInvoke and call OleSetClipboard API mean? Thanks.

P.S. I am only analyzing one specific pixel, is there a way to determine the color of a pixel real-time, without having to take a screenshot and analyze it? Or can I take a screenshot of a very small area? A 10x10 or perhaps maybe even of one pixel? Thanks again.
__________________
~~~~~~~~~~~~~~~~~~~~~
I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clipboard bschleusner C# 2005 1 February 16th, 2007 08:20 AM
Is the clipboard empty? achinfish Excel VBA 1 July 15th, 2006 04:34 PM
Clipboard Problem mjackson11 Visual C++ 1 December 7th, 2004 02:31 PM
the clipboard natmaster Java GUI 0 May 31st, 2004 02:16 PM
Saving to the clipboard xelepi Javascript How-To 2 November 7th, 2003 07:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.