Desktop streaming to Texture2D

Hi, I want to stream the desktop in real time into a Texture2D (or another object) in my project. What is the best way to do this?
Thanks!

No idea what’s the best way to do this. But one way is using an online search engine and finding this:

Thanks for the reply.