从directx捕获屏幕 [英] Capture screen from directx

查看:198
本文介绍了从directx捕获屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我正试图从全屏游戏中截取屏幕截图,我尝试过GDI方法,但我只得到黑屏。



我读到我应该尝试从这个链接尝试使用DirectX:



各种捕获屏幕的方法 [ ^ ]



但没有任何成功。



任何人都可以帮助我吗?



非常感谢。



我尝试过:



Hello,

I'm trying to take a screenshot from a fullscreen game, I've tried GDI method but I get only black screens.

I read that I should solve trying to use the DirectX from this link:

Various methods for capturing the screen[^]

but without any success.

Can anyone help me?

Thanks a lot.

What I have tried:

Dim bmpScreenshot = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb)
Dim gfxScreenshot = Graphics.FromImage(bmpScreenshot)
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy)
bmpScreenshot.Save(ssPath & shotName & ".jpg", ImageFormat.Png)

推荐答案

谷歌搜索有许多链接可以给你答案: vb从directx捕获屏幕 - Google搜索 [ ^ ]





这是一个:获取DirectX全屏应用程序的截图 - Stack Overflow [ ^ ]
Google search has a number of links that could give you the answer: vb Capture screen from directx - Google Search[^]


Here is one: Take screenshot of DirectX full-screen application - Stack Overflow[^]


这篇关于从directx捕获屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆