上一篇 | 下一篇

如何截取屏幕画面

发布: 2008-6-26 09:17 | 作者: admin | 来源: | 查看: 3次

事实上,这是摸拟按下Print Screen的作法

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 = 1

Const theForm = 0

Private Sub Command1_Click()

Call keybd_event(vbKeySnapshot, theForm, 0, 0)

'若theForm改成theScreen则Copy整个Screen

DoEvents

Picture1.Picture = Clipboard.GetData(vbCFBitmap)

End Sub

字号: | 推荐给好友

评分:0

我来说两句