clipboard

How to save PngImage from clipboard

梦想的初衷 提交于 2019-12-09 06:27:38
问题 How can i save the pngimage to file copied form AdobeFirewoks(Clipboard) or Photoshop without losing the transparency. i am using delphi2009. thank you in advance. @TLama I tried this code but there is no transparency. I don't know also if i do it right. png := TPngimage.Create; try png.LoadFromClipboardFormat(CF_BITMAP, Clipboard.GetAsHandle(CF_BITMAP), CF_BITMAP); image1.Picture.Assign(png); finally png.Free; end; 回答1: Based on empirical results confirmed by my colleague having Adobe

Button to copy the value of a string to the clipboard

大城市里の小女人 提交于 2019-12-09 06:19:27
问题 I'm modifying an old Android application. I have a GPS lat and long being stored in a string value and displayed to the user in a non-editable text box when it resolves. I want to add a button which simply takes the value of the string, and copies it to the clipboard. I've looked at this: How to copy text programmatically in my Android app? But not sure how to implement it. Any help would be great, I haven't touched much development in this area recently! Thanks Edit: //Set button (inside

Create and Copy hyperlink with text/caption to Clipboard with c#

对着背影说爱祢 提交于 2019-12-09 04:41:33
问题 In all sorts of programs you can copy hyperlinks to clipboard and paste them into other applications. E g the ’feedback always welcome’ link at the bottom of this page can be copied and pasted into MS Word. I want to create such a link programmatically, copy it to the Clipboard and then be able to paste it somewhere else. For example a link with the text Stack that maps to stackoverflow.com . I’ve tried all sorts of things with Clipboard.SetData but nothing seems to do the trick. (I'm working

Copy and paste in codemirror.js embeded in javafx application

谁都会走 提交于 2019-12-09 01:07:10
问题 I'm creating simple editor in Java FX using codemirror.js library. I embeded codemirror editor in javafx using javafx.scene.web.WebView component, with the folowing html/js code: <body> <form> <textarea id="code" name="code"> </textarea> </form> <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { lineNumbers: true}); </script> </body> Codemirror editor itself supports undo, redo, cut, copy and paste. I have also javafx main menue in my application and I want to

C++ Get string from Clipboard on Linux

对着背影说爱祢 提交于 2019-12-09 00:37:56
问题 Hello I'm writing a c++ program and I need to get what's on clipboard into a string variable. I found a lot of solutions but all of them were written for windows. Is there any method without using the QT libraries? I found something related to X11 but not very explicit aswell. Thank you very much 回答1: Did you try to find not a code first but a program with an implementation ? I did it for you and found a lot of implementations which use direct X11 calls. I think the most valuable is this but

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

只谈情不闲聊 提交于 2019-12-08 23:09:25
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 trouble for the system somehow? Specifically, I know Windows can remove my viewer without trouble

Does MFC provide a quick way to throw text on the clipboard?

此生再无相见时 提交于 2019-12-08 18:09:01
问题 The add-to-clip-board code we have in our code base is quite low-level - allocating global memory and so on. For the simple case I just want to put some plain text on the clipboard, are there any routines which can wrap all that stuff? An example is that CRichEditCtrl has Copy() & Cut() methods which automatically put the current selection on the clipboard. Does MFC make this kind of functionality available in isolation? Update : Created a new question based on mwigdahl's response 回答1: No,

Clipboard.SetText(HTML) no longer work

六月ゝ 毕业季﹏ 提交于 2019-12-08 13:55:56
问题 I had a code which was adding certain generated string between HTML Tags and setting up the clipboard with HTML data. If I am not insane yet I am certain this code worked for me before, no changes have been made to it, but it doesn't work anymore! I found the documentation of Clipboard HTML and took the example, made the test below and it does't work for me either. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Dim meh As String = _ "Version:0.9" & vbCrLf &

Spotfire - mark records and send to clipboard

£可爱£侵袭症+ 提交于 2019-12-08 12:59:38
问题 I'd like to create a Spotfire button action control that does the following Select all rows in a table visualization Send the selected rows to the clipboard First step was handled pretty easily (borrowed from here). For the second step, I was unsuccessful in my initial attempts to send to clipboard with script (e.g. as suggested here). I was partially successful in a followup attempt by sending ctrl-c programatically to spotfire (see spotfired.blogspot.co.id/2014/04/pressing-keys

Clipboard.GetText overrides clipboard?

做~自己de王妃 提交于 2019-12-08 10:59:51
问题 Here is what im trying to do: There is some game which writes some info about item under mouse cursor into clipboard when i press Ctrl-C. Im trying to grab that info and select some stuff i need from it. Im doing it like this: //at form load RegisterHotKey(this.Handle, 0, 0x002, (int)Keys.C); protected override void WndProc(ref Message m) { if (m.Msg == 0x0312) { int id = m.WParam.ToInt32(); if (id == 0) { System.Threading.Thread.Sleep(155); //ive thought if i add some delay it would help but