下面图老师小编要跟大家分享如何截取屏幕画面,简单的过程中其实暗藏玄机,还是要细心学习,喜欢还请记得收藏哦!
【 tulaoshi.com - 编程语言 】
事实上,这是摸拟按下Print Screen的作法
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/bianchengyuyan/)Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Const theScreen = 1Const theForm = 0Private Sub Command1_Click()Call keybd_event(vbKeySnapshot, theForm, 0, 0)'若theForm改成theScreen则Copy整个ScreenDoEventsPicture1.Picture = Clipboard.GetData(vbCFBitmap)End Sub
来源:http://www.tulaoshi.com/n/20160219/1613348.html