You can do : Clipboard.Current = ClipBoard.Selection Clipboard.Copy(txtData.Text)
And then the Data will be availbale in the secondary clipboard too... AKA the middle mouse button paste datas 2016-03-09 17:07 GMT+01:00 Rolf-Werner Eilert <[email protected]>: > > Am 09.03.2016 17:01, schrieb ML: >> 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. >> >> > > Aah - Gambas rocks! > > Thank you > > Rolf > > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
