copy-paste

How can I paste arbitrary data into a TMemo?

Copying and pasting text is easy enough, since it's built into TMemo, but it seems that it can only handle text. Seems to me that any kind of data can be represented as a string, though. If I copy some arbitrary data from another program and want to paste it into a TMemo, how do I get Delphi to accept it as a raw string? ...

Paste syntax highlighted code from Komodo?

I recently switched from using Vim in Puttytray on WindowsXP to Komodo on OSX. One of the features I miss is Puttytray used to let you copy the colored text out of whatever is in your terminal and paste it as rich text on any application that accepts it (like your instant messanger). This makes it easier for me to discuss code with cowo...

Copy + paste out of a Flex DataGrid control

Is there a way to select a single cell in a Flex DataGrid, and then either select the text inside of the cell, or select the entire cell for copy + paste? It doesn't even have to copy into an excel friendly format, flat text would be fine. So far, I have only been able to select an entire row, and that doesn't seem to copy very well. I a...

Object reference problem

Hi guys! Following problem: I would like to build a little clipboard with jQuery. I have tried several times to store an object in the data of a javascript object with $(object).data('id',objectToStore). Objects can be stored there that works fine. The problem is if I try to insert the stored data I only get a reference to that object....

Copy Datagridview to clipboard in Windows Forms

Hi, I would like to copy Datagridview selected rows to clipboard and paste them in notepad or Microsoft Word. What is the best method to achieve this? Thank you.. ...

Send Ctrl-C to process open by java

Under Windows OS. I start a sub-process via a Runtime.getRuntime().exec(); I want to send a "ctrl-c" to the process. I did a small example , with Runtime.getRuntime().exec("ping google.com -n 100000"); The code can be found there : http://pastebin.com/f6315063f So far, I tried to send the char 3 (ctrl-C character) via Process outputSt...

Vba Summary Page

hello,I am new to vba and I would like to know if can search thru the worksheets, copy and then paste in a new worksheet on a column thank you Public Sub CopyandPaste() Dim ws As Worksheet ' Delete all data from Summary Page Worksheets("1a").UsedRange.Delete ' Copy each worksheet in file and paste to Summary Page For Each ws In Works...

how can i simulate CTRL+C in C#

I have the following code which works fine in notepad but not in WORD!! [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow(); [DllImport("user32.dll", SetLastError = true)] public static extern uint GetWindowThreadPr...

How can I fix "Cannot open clipboard: Access Denied" errors?

I am using the following code to copy text to the clipboard: Clipboard.Open; try Clipboard.AsText := GenerateClipboardText; finally Clipboard.Close; end; Seemingly at random I get "Cannot open clipboard: Access Denied" errors. I'm guessing that these errors are caused by other application locking the clipboard, but I n...

Visual Studio copy/paste into Outlook with standard formatting?

I have custom settings in Visual Studio that include a dark background. Copy/pasting to Outlook produces a crime against eyeballs with a dark background in code on a white background of the mail. Does anyone have any ideas of how I can paste code in standard VS formatting (NOT unformatted text from paste special, and not paste with my c...

How to copy to clipboard with X11?

Using the frameworks on OS X, I can use the following to copy a PNG to the pasteboard (in C — obviously I could use NSPasteboard with Cocoa): #include <ApplicationServices/ApplicationServices.h> int copyThatThing(void) { PasteboardRef clipboard; if (PasteboardCreate(kPasteboardClipboard, &clipboard) != noErr) { return -1; ...

Copy text from Vim 7.2 running in xterm to windows clipboard

I'm using Vim 7.2 , compiled with +xterm_clipboard , in a xterm through putty . I've put set clipboard=unnamed in .vimrc , and from what i've read in other threads , this should put all yanks/deletes to the system clipboard. However , when I'm trying to paste whatever i've yanked to a MS app like notepad, its not working. When I select ...

How does Copy Paste of formatted text work?

I'm confused about what implements the functionality of copy and paste. This is exactly what I'm confused with: When I copy formatted text from MS Word (which uses a different markup language than HTML) and paste into an RTF editor in a web browser like gmail or http://www.freerichtexteditor.com/index.php?inc=demo/index the formatting i...

Enable copy and paste on UITextField without making it editable

I want the text in a UITextField (or ideally, a UILabel) to be non-editable, but at the same time give the user the ability to copy and paste it. ...

How can I detect copy & pasted code using git?

I just read the git-blame manual page once more and noticed this part: A particularly useful way is to see if an added file has lines created by copy-and-paste from existing files. Sometimes this indicates that the developer was being sloppy and did not refactor the code properly. You can first find the commit that introduced the fil...

Console CTRL-C handling when using serial port fails

Using VB.Net I've added a CTRL-C handler: AddHandler Console.CancelKeyPress, AddressOf QuitHandler Which does the following: Private Sub QuitHandler(ByVal sender As Object, ByVal args As ConsoleCancelEventArgs) Console.WriteLine("Quitting...") args.Cancel = True Quit = True End Sub I then have a main l...

Wysiwyg with image copy/paste

First, I understand that an image cannot be "copied" from a local machine into a website. I understand that it must be uploaded. I am a web programmer, and am familiar with common web wysiwyg tools such as TinyMCE and FCKEditor. My question is if there exists a program or web module or something of the sort that works will perform an aut...

C++: Continue execution after SIGINT

Okay, I am writing a program that is doing some pretty heavy analysis and I would like to be able to stop it quickly. I added signal(SIGINT, terminate); to the beginning of main and defined terminate like: void terminate(int param){ cout << endl << endl << "Exit [N]ow, or [A]fter this url?" << endl; std::string answer; cin >> ...

How to implement the "Edit" menu with "Undo", "Cut", "Paste" and "Copy"?

Greetings, for one of my applications I'm trying to implement an "Edit" menu. This menu usually has the standard-entries Undo, Cut, Copy and Paste. This menu is not there by default, and users seem to expect it especially on Mac OS X. Is there a an easier way of implementing this, without doing so in every widget manually? Since most ...

Can't paste (Command+V) into an NSTextField

For some reason, an NSTextField isn't allowing me to paste anything into it using Command+V, though I can paste into it if I right-click and click 'Paste'. Why is this happening and how do I fix it? ...