well on your keyboard has a key name ( PrtSc ) this is for print screen
and save as png gif whatever
if you want the code in VB net i can provide to you
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I know how to capture view in self thread.
but do not know how to capture screen and convert to gif.
well on your keyboard has a key name ( PrtSc ) this is for print screen
and save as png gif whatever
if you want the code in VB net i can provide to you
In C#/WinUI, it works with IDXGIOutputDuplication::AcquireNextFrame then by converting the texture bits into WriteableBitmap
then BitmapEncoder to save as GIF or any other supported format
(tested on Windows 10 21H1)
There are many screen capture examples, Capturing an Image(GDI), Screen capture for HWND(Windows.Graphics.Capture API), DXGI desktop duplication sample(IDXGIOutputDuplication).
Then you encode the frame data to gif using Windows Imaging Component .