clipboard

client system clipboard print screen image save in server system

。_饼干妹妹 提交于 2019-11-28 12:09:54
问题 It is possible the client system clipboard print screen image save in server system using C#. net web application 回答1: If you looking at capturing users screenshot then we have lot of question in SO. Here is a sample in c# . Th word server confuses me because you cannot take a screen shot of users desktop from your web application. 来源: https://stackoverflow.com/questions/999847/client-system-clipboard-print-screen-image-save-in-server-system

VBA: Read file from clipboard

怎甘沉沦 提交于 2019-11-28 11:39:27
I'm trying to load a file in a VBA macro that has been copied from, say, an Explorer window. I can easily get the data from the clipboard using DataObject::GetFromClipboard, but the VBA interface to DataObject doesn't seem to have methods for working with any other formats than plain text. There are only GetText and SetText methods. If I can't get a file stream directly from the DataObject, the filename(s) would also do, so maybe GetText could be forced to return the name of a file placed on the clipboard? There is very little documentation to be found for VBA anywhere. :( Maybe someone could

how to get clipboard data in angular JS

℡╲_俬逩灬. 提交于 2019-11-28 10:55:51
I was actually looking to get the content of clipboard using angular JS to simulate a copy paste thing. I created a directive for copy to clipboard which is using the document.execCommand() method. Directive (function() { app.directive('copyToClipboard', function ($window) { var body = angular.element($window.document.body); var textarea = angular.element('<textarea/>'); textarea.css({ position: 'fixed', opacity: '0' }); function copy(toCopy) { textarea.val(toCopy); body.append(textarea); textarea[0].select(); try { var successful = document.execCommand('copy'); if (!successful) throw

Copying an image to clipboard using JavaScript/jquery [duplicate]

≯℡__Kan透↙ 提交于 2019-11-28 10:48:02
This question already has an answer here: Copy Image to Clipboard from Browser in Javascript? 2 answers I need to copy an image to clipboard using JavaScript/jquery and I am using the following js to achieve that. function copyImageToClipBoard() { var div = document.getElementById('chart1'); div.contentEditable = true; var controlRange; if (document.body.createControlRange) { controlRange = document.body.createControlRange(); controlRange.addElement(div); controlRange.execCommand('Copy'); } div.contentEditable = false; } It works fine locally in IE. But when I tried to test it from other

Copy to Clipboard that also works on Mobile?

让人想犯罪 __ 提交于 2019-11-28 10:08:29
I'm familiar with ZeroClipboard and jquery.copy, which both use Flash. OK, so I get it, for browser security reasons, copying is disallowed and we need Flash. But this means the copying functionality does not work in mobiles (iPhone, Android) or iPad. Is there any resource or plugin that allows a simple Copy to Clipboard functionality on both modern browsers (include IE7+) and mobile browsers? Thanks! I just wanted to offer an update, since there have been some recent developments on this front. Modern browsers, except for Safari support copying via JS, using the execCommand() api. Assuming

JavaScript copy text to clipboard [duplicate]

China☆狼群 提交于 2019-11-28 09:38:36
Possible Duplicate: Copy selected text to the clipboard WITHOUT using flash - must be cross-browser This one has kept me going for a long time. How would I copy text to the clipboard? Here is my code: <body> <textarea name="text" rows="5" cols="20" wrap="hard" onblur="CopyToClipboard()">Enter text here and it will be copied to the clipboard!</textarea> </body> <script type="text/javascript"> function CopyToClipboard() { //O_O Confused... what do I do... } </script> Here is one way you can do it... <body> <textarea rows="5" cols="20" wrap="hard" onblur="CopyToClipboard(this)"></textarea> </body

Android clipboard code that works on all API levels

假如想象 提交于 2019-11-28 07:51:42
The clipboard code that works for API levels < 11 crashes on devices with API levels >= 11. The clipboard code that work for API level >= 11 crashes on devices with API levels < 11. I can not compile code for both versions because they have conflicting import requirements. One needs: import android.text.ClipboardManager; while the other needs: import android.content.ClipboardManager; Surely there is a way write some code that will work on both sides of API level 11. I just can't figure it out. ** * Edited (Since I can't answer my own question) ** * ** * * I found the problem. The exception

calling a method when content of clipboard is changed

故事扮演 提交于 2019-11-28 07:48:41
I'm trying to make a little desktop app that should show the contents of the clipboard (if it is a string). I have done a constructor that does that and it works well, now I just want to make a call to a similar method whenever a text is copied into the clipboard in the OS. I'm quite new to this so any help would be appreciated! Something tells me I should use interrupts in some way... package pasty; import java.awt.FlowLayout; import java.awt.Toolkit; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import

Copy pandas dataframe to excel using openpyxl

安稳与你 提交于 2019-11-28 07:45:00
I have some complicated formating saved in a template file into which I need to save data from a pandas dataframe. Problem is when I use pd.to_excel to save to this worksheet, pandas overwrites the formatting. Is there a way to somehow 'paste values' form the df into the worksheet? I am using pandas 0.17 import openpyxl import pandas as pd wb= openpyxl.load_workbook('H:/template.xlsx') sheet = wb.get_sheet_by_name('spam') sheet.title = 'df data' wb.save('H:/df_out.xlsx') xlr = pd.ExcelWriter('df_out.xlsx') df.to_excel(xlr, 'df data') xlr.save() openpyxl 2.4 comes with a utility for converting

Copy empty string using Clipboard.SetText(string)

风格不统一 提交于 2019-11-28 07:36:50
问题 Clipboard.SetText("") throws me an error - "Value cannot be null". So how do I copy an empty string using Clipboard.SetText ? I have already done Clipboard.Clear() . It does clear the clipboard, but it doesn't help me to paste an empty string Any suggestions? 回答1: If you try to save null or an empty string using Clipboard.SetText it will never work. See Clipboard.SetText Method (String) (MSDN). It mentions ArgumentNullException is thrown if the text is null or Empty for Clipboard.SetText .