Some Windows programs show private data. You can stop Windows from taking and saving screenshots of your app by using SetWindowDisplayAffinity with the WDA_EXCLUDEFROMCAPTURE flag.