clipboard

clipboard Listener event is being called twice

末鹿安然 提交于 2020-01-01 14:38:31
问题 i want to save the changes in my clipboard. so i registered my application to get all the changes that happens to the Clipboard. Using [DllImport("User32.dll")] protected static extern bool AddClipboardFormatListener(int hwnd); and then protected override void WndProc(ref Message m) { switch (m.Msg) { case WM_CLIPBOARDUPDATE: OnClipboardChanged(); break; ... } } private void OnClipboardChanged() { if (Clipboard.ContainsText()) { MessageBox.Show(Clipboard.GetText().ToString()); } } The Problem

SendKeys Ctrl + C to external applications (text into Clipboard)

六月ゝ 毕业季﹏ 提交于 2020-01-01 09:36:28
问题 I have an app that sits as a trayicon in the system tray. I have registered a Hotkey that when pressed will capture the current text selection in any application, even in Web Browsers. My aproach is to send the key combination {Ctlr + C} to copy the text. Then access the Clipboard and use the text in my own application. I am programming in VB.NET but any help in C# or even C++ with Win32_Api would be highly appreciated. I use AutoHotkey and there, I have a script which access the Clipboard

Paste from Excel to WPF DataGrid

最后都变了- 提交于 2020-01-01 08:12:08
问题 I have a DataGrid (called TheGrid) that I would like to implement copy and paste functionality on. The copy functionality works great but I don't know how to implement paste. Do I just need to get the data from the clipboard and parse myself? The command bindings: <Window.CommandBindings> <CommandBinding Command="Copy" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute" /> <CommandBinding Command="Paste" Executed="CommandBinding_Executed" CanExecute="CommandBinding

Clipboard Copy-Paste doesn't work in a service on Win Server 2008/Vista 64bit

≡放荡痞女 提交于 2020-01-01 06:30:30
问题 Update: This issue has been resolved. you can read about the solution in here: Creating a process in a non-zero session from a service in windows-2008-server? Thanks everyone! Hi, I am trying to use Clipboard API (in Delphi) to extract images from Word documents. my code works OK in Windows XP/2003 but in windows 2008 64 bit it doesn't work. in win 2008 i get an error saying that Clipboard.Formats is empty and doesn't contain any format. The image seems to be copied to the Clipboard (i can

Clipboard Copy-Paste doesn't work in a service on Win Server 2008/Vista 64bit

怎甘沉沦 提交于 2020-01-01 06:30:10
问题 Update: This issue has been resolved. you can read about the solution in here: Creating a process in a non-zero session from a service in windows-2008-server? Thanks everyone! Hi, I am trying to use Clipboard API (in Delphi) to extract images from Word documents. my code works OK in Windows XP/2003 but in windows 2008 64 bit it doesn't work. in win 2008 i get an error saying that Clipboard.Formats is empty and doesn't contain any format. The image seems to be copied to the Clipboard (i can

Alpha becomes black when coming from clipboard on Mozilla Firefox and MS Edge

烂漫一生 提交于 2020-01-01 05:55:38
问题 I'm using a code from here to paste images from clipboard on a page. It works fine in all browsers (Chrome, Firefox, Edge and Opera). The problem is: when the image is a PNG or GIF with alpha channel (transparent areas), the alpha becomes black in Firefox and Edge. Here's the code snippet (or jsfiddle if you prefer): document.getElementById('pasteArea').onpaste = function (event) { // use event.originalEvent.clipboard for newer chrome versions var items = (event.clipboardData || event

Alpha becomes black when coming from clipboard on Mozilla Firefox and MS Edge

与世无争的帅哥 提交于 2020-01-01 05:55:09
问题 I'm using a code from here to paste images from clipboard on a page. It works fine in all browsers (Chrome, Firefox, Edge and Opera). The problem is: when the image is a PNG or GIF with alpha channel (transparent areas), the alpha becomes black in Firefox and Edge. Here's the code snippet (or jsfiddle if you prefer): document.getElementById('pasteArea').onpaste = function (event) { // use event.originalEvent.clipboard for newer chrome versions var items = (event.clipboardData || event

How do I get rid of the “cannot empty the clipboard” error? [closed]

社会主义新天地 提交于 2020-01-01 04:58:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Right now, I'm getting it in Excel 2007, but I've gotten the same error in pretty much every version of Excel I've used since 97. The only discernable similarity is that happens on my office PC. It's never bothered me on my home PC. In Excel 2003, I was able to mess around in the clipboard options until it went

Copy a string to clipboard from Mac OS command line

老子叫甜甜 提交于 2020-01-01 04:42:15
问题 is there a way to copy a string to clipboard from command line? To be more specific, I want to make a script which copies my email address to clipboard, so that when I need to insert it several times for logging in / register, I just run the script once and then CMD+V it whenever I need. I heard of pbcopy , but I think this is not my case. Any suggestion? Many thanks! 回答1: You need to pipe the output of your script to pbcopy For example: ./somescript.sh | pbcopy 回答2: echo 'your-email@example

What do various clipboard/drag-and-drop formats mean?

核能气质少年 提交于 2020-01-01 03:41:14
问题 I was playing around with drag and drop. I made a sample application and dropped a file from folder My Music onto my application. Here's what e.Data.GetFormats() returned: Shell IDList Array UsingDefaultDragImage DragImageBits DragContext DragSourceHelperFlags InShellDragLoop FileDrop FileNameW FileName IsShowingLayered DragWindow IsComputingImage DropDescription DisableDragText ComputedDragImage IsShowingText What do each of these mean and how to decode and use them? Googling each of them