How to implement the clipboard monitor service in C#?

Hello. I needed to write a program in C# and implement it monitoring the clipboard. I decided to use this solution. Regular window app worked for me, because I can easily get Handle of the window.
But when I needed to make a service in C# there was a problem with getting Handle.
Is it possible to move the clipboard monitor from the program in the service or will have to resort to any other method of monitoring the clipboard service in C#?
June 10th 19 at 16:03
1 answer
June 10th 19 at 16:05
Any interaction with the UI service is Deprecated.
You can tick that allows such, but this is not true, because some of the moments you have it will simply cease to work after upgrading the system, for example.

It is best to make an application without a visible form, which is easily done by your monitor.
Add it in startup, it runs without forms and all. You can even add icon in the notification area to view the status (when clicked will show a form, the form is hidden when closed, and comes out) or something.

Find more questions by tags C#