clipboard

Can aborting a process without resetting the clipboard chain cause trouble?

大兔子大兔子 提交于 2019-12-08 08:48:29
问题 I've got a program that calls SetClipboardViewer at startup to register for clipboard change notifications. At shutdown time, it will call ChangeClipboardChain to remove itself from the chain correctly. This is all great as long as the program runs normally. But that's got me wondering, what happens if the program gets aborted, either by me killing it under the debugger, by a crash, or by the user killing the process because something went wrong? Then the cleanup never happens. Can that cause

Clipboard.GetData() returns null when it should not

白昼怎懂夜的黑 提交于 2019-12-08 08:43:03
问题 I am copying cells from an excel document to the clipboard so they can be inserted as an image elsewhere. The cells get copied to the clipboard fine, as I can paste the image manually after the code is run. However I cannot get ahold of the data. Here is my code: tempWorkSheet.Range[tempWorkSheet.Cells[1, 1], tempWorkSheet.Cells[3, 3]].CopyPicture(Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlPicture); // returns true var test = Clipboard.GetDataObject().GetDataPresent

set clipboard content in any browser

最后都变了- 提交于 2019-12-08 07:31:06
问题 I need to set my user's clipboard when they trigger an event on my webpage. I realize each browser has a different way to do this, so do you know of a library or code snippet that will achieve this cross-browser? 回答1: This article might help you with that : Copy to Clipboard with Javascript on Mozilla firefox and IE The basic idea is to : use window.clipboardData for Internet Explorer and use some flash component for Mozilla Seems that this doesn't work with Flash 10, though, from some

New AVD takes a picture saves to clipboard

一个人想着一个人 提交于 2019-12-08 05:37:42
When I create a new Android Virtual Device and run it for the first time in Eclipse, I have noticed that it activates my webcam and takes a picture. This picture is saved to my clipboard. But I was wondering if this is normal and happens to anyone? INFO: Android Development Toolkit Version: 16.0.1.v201112150204-238534 Android 4.0.3 API level 15 Running on Windows XP EDIT: Tracked it down to what I think is the SDL_app process. Also when I disabled my clipboard and started it up I got this printed to the terminal: [2012-01-26 05:12:12 - Emulator] emulator: ERROR: camera_device_start_capturing:

IE11 pasting clipboard data to an input element annoyance

一曲冷凌霜 提交于 2019-12-08 05:23:16
问题 I had some javascript that basically listened for the "paste" event on a particular input text element. I did this event binding via jQuery. Now, in previous versions of IE, things worked great. But after upgrading to IE11, the behavior is different. Scenario: I'm copying and pasting multiple keywords separated by a CR and LF (multiple rows in a spreadsheet). In javascript, within the "paste" event handler, I read the clipboard data and convert all the CR/LF characters into a single comma,

Load image from WebBrowser without redownloading or copying

核能气质少年 提交于 2019-12-08 05:12:29
I am currently copying from clip board to load image from browser IHTMLDocument2 doc = (IHTMLDocument2) webBrowser1.Document.DomDocument; IHTMLControlRange imgRange = (IHTMLControlRange) ((HTMLBody) doc.body).createControlRange(); foreach (IHTMLImgElement img in doc.images) { imgRange.add((IHTMLControlElement) img); imgRange.execCommand("Copy", false, null); using (Bitmap bmp = (Bitmap) Clipboard.GetDataObject().GetData(DataFormats.Bitmap)) { bmp.Save(@"C:\"+img.nameProp); } } But it has some problems using clipboard. Is there any other way to do that. In internet explorer all images go to

Multiple lines of text to clipboard

为君一笑 提交于 2019-12-08 05:11:25
问题 Is there a way to send multiple lines of text to the clipboard using javascript? IE, I want to send: abc def ghi and not abcdefghi (and although right now i need to learn how to do it in Javascript, I would not mind hearing how it is done in other languages, like python) 回答1: Send it as one string with carriage return and line feed characters in it, as Russ suggested. You replied to Russ that, "it does not work": what's the symptom of it not working? If you're copying from the clipboard into

C# saving and then retriving data via the clipboard

放肆的年华 提交于 2019-12-08 02:56:42
问题 Okay, So I have a program that automatically copies data to the clipboard and then into memory. What I want to do is, to save the data that is on the clipboard prior to my program running and then to copyit back to the clipboard once I have finished what I need to do. I can get the data fromt he clipboard as such: IDataObject currentClipboard = Clipboard.GetDataObject(); However, when I want to put the data back on to the clipboard, do I need to know what format that data is in to cast it? Is

Gtk Ckipboard: pasting files from a source with custom URI scheme

这一生的挚爱 提交于 2019-12-08 00:00:06
问题 I'm trying to write a a GTK/C application that puts some files on the Gtk clipboard, so a user with Nautilus will be able to paste them. There is a good example of Gtk Clipboard local file copy and paste on stackoverflow. Unofrtunately the files I need to paste are not on the local disk, and cannot be accessed via a standard GVFS URI scheme like file:// Only my application can access these source file after setting up a TCP connection, authenticating and opening an extra channel. How can I

How can I paste an image from the clipboard onto a Canvas element using Dart?

折月煮酒 提交于 2019-12-07 18:02:03
问题 I'm using Dart to develop a personal whiteboard Chrome app and it is sometimes useful to be able to quickly copy and paste an image (e.g. a slide from a presentation, a diagram or a handout) so that I can add notes over the image while teaching a class or giving a presentation. How can I paste an image stored on the clipboard onto a canvas element in Dart? 回答1: Actually, this answer to the same question for JS is almost directly applicable. A Dart translation might look something like: import