带有Alt + Printscreen功能的C或C#代码 [英] C or C# Code for Alt + Printscreen function

查看:91
本文介绍了带有Alt + Printscreen功能的C或C#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我是该小组的新手,并希望我能学到更多的知识和帮助.

我需要一段代码,可以复制Alt + printscreen的功能.

谢谢和问候,
Arun.

Hello,

I am new to the group and look forward to a learn grow and help if I can.

I need a piece of code which can replicate the function of Alt + printscreen does.

Thanks and Regards,
Arun.

推荐答案

本文可能会为您提供帮助:

TeboScreen:基本的C#屏幕捕获应用程序 [
This article might help you:

TeboScreen: Basic C# Screen Capture Application[^]


请注意有关c或C#的信息,但在VC ++中我正在使用使用BitBlt API可以做到这一点.

基本上,您可以实现要打印屏幕的窗口的句柄,并使用GetDC可以获取其数据,然后使用BitBlt可以将这些数据复制到Device Context(DC)中并保存为所需的任何格式.

另一种非常简单的方法是,您也可以触发Alt + Print Screen Ket笔画,并使用SendInput API的kbd_event完成事情:)

希望这会有所帮助!!!

prakash
Note sure about c or C# but in VC++ i was using BitBlt API to Get This Done.

Basically you can achieve the handle of the window you want to print screen and using GetDC you can achieve it data and then Using BitBlt you can copy that data in your Device Context(DC) and save as any format you want.

one other very simepl way is you can fire the Alt+Print Screen Ket stroke as well to get your thing done using kbd_event of SendInput APIs :)

Hope this helps !!!

prakash


这篇关于带有Alt + Printscreen功能的C或C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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