Recent

Author Topic: [SOLVED] How to save a Graphic from a TPicture in the Clipboard (Linux problem)?  (Read 1488 times)

Zvoni

  • Hero Member
  • *****
  • Posts: 2792
Re: How to save a Graphic from a TPicture into the Clipboard (Linux problem)?
« Reply #15 on: December 11, 2024, 02:47:47 pm »
hmmm....

As a Test:
1) Try your Save to Clipboard (That error should show)
2) Try to do a CTRL+V somewhere else (say in gimp or wherever)
3) Try your Save to Clipboard again --> Does the error occur again?

Otherwise i'm out of ideas
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

wp

  • Hero Member
  • *****
  • Posts: 12516
Re: How to save a Graphic from a TPicture into the Clipboard (Linux problem)?
« Reply #16 on: December 11, 2024, 03:04:58 pm »
because main file png.pas has only 28 lines
This seems to indicate that you are not writing a standard LCL GUI application. In this case you probably did not have the unit InterfaceBase (or Interfaces?) in the uses clause and thus did not initialize the widgetset-based access to the clipboard.

Hartmut

  • Hero Member
  • *****
  • Posts: 891
Re: How to save a Graphic from a TPicture into the Clipboard (Linux problem)?
« Reply #17 on: December 11, 2024, 05:17:16 pm »
As I assumed, there was something wrong in the kind in which I started my program. To find out, what I must change, I created a new Topic and a small demo project: https://forum.lazarus.freepascal.org/index.php/topic,69574.0.html

I close this Topic now. Thanks a lot to wp and Zvoni for your help.

 

TinyPortal © 2005-2018