LV-Vikingr Posted October 10, 2006 Report Share Posted October 10, 2006 Hello everyone, I have been trying to get an image from the windows clipboard for some time now and have had no success. The problem is that the getclipboard data function in the user32.dll does not seem to be usable with the Call Library Function Node. Although I know that it would be easy enough to create some other code to translate data types between the function and the program, I would like to find a more eloquent way of handling this (through LabVIEW exclusively). I have no sample code for this problem as it is, as yet, unsolved for me. I do wonder if there is a way to use functions in ntdll.dll that may accomplish this task for me better. Thank you! :beer: Quote Link to comment
Yair Posted October 10, 2006 Report Share Posted October 10, 2006 GetClipboardData can be called from LV. Have a look at the VI attached here. Correction - that VI copies images to the clipboard. If you want to get an image, there is an Application class scripting method called Get Clipboard Image (see attached). Download File:post-1431-1160501184.vi Quote Link to comment
LV-Vikingr Posted October 10, 2006 Author Report Share Posted October 10, 2006 Unfortunately, I need to acquire the image from the Windows clipboard. That method acquires images from the LabVIEW clipboard. The reason this is important is that I am acquiring an image the user acquired using Print Screen or Alt + Print Screen. My apologies, it does acquire images from the windows clipboard. Thank you for finding this, but could you tell me how you got it? I can't seem to replicate the application clipboard getimage method, I can only get to read and write string methods for the clipboard. Thanks again! Quote Link to comment
Yair Posted October 10, 2006 Report Share Posted October 10, 2006 As I mentioned, it is a scripting (meaning private) method. Before LV 8, it was simply a matter of adding an ini file setting. In 8, it's more complicated. See the scripting board for more details. If you're afraid of using unsupported methods, you can try looking for the full version of Rolf's library linked to in my post. It should probably also have VIs which use GetClipboardData. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.