On 2016-03-09 12:42, Rolf-Werner Eilert wrote: > When I want to copy data for copy-and-paste like with Ctrl-C, how could > I do it directly from code (via press of a button) instead of offering a > text area for the mouse? > > In our database, sometimes I need a student's address in Writer or > another program. It would be nice to have a button to copy the relevant > fields automagically to be used in Writer by Ctrl-V. > > I haven't found any information about this because I don't know where to > look for. > > Thanks for your insight! > > Rolf For that you should use the Clipboard object:
Clipboard.Clear Clipboard.Copy(txtData.Text) You can also .Paste() from the clipboard. ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user