by ahmad sobeh (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 25th April 2004
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Functions like the print screen button
API Declarations
Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Private Const TheScreen = 0
Private Const TheForm = 1
keybd_event vbKeySnapshot, TheScreen, 0&, 0&
DoEvents
Me.Picture = Clipboard.GetData(vbCFBitmap)
Clipboard.Clear
Me.Width = Screen.Width
Me.Height = Screen.Height
Me.Top = 0
Me.Left = 0
End Sub