What is the api call to print screen? The old api I used on winnt does not seem to work.
Thanks
Printable View
What is the api call to print screen? The old api I used on winnt does not seem to work.
Thanks
Try thisVB Code:
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 VK_MENU As Byte = &H12 Private Const VK_SNAPSHOT As Byte = &H2C Private Const KEYEVENTF_KEYUP = &H2 Private Sub cmdPrintScreen_Click() Dim lHeight As Long Clipboard.Clear Call keybd_event(VK_SNAPSHOT, 1, 0, 0) DoEvents Call keybd_event(VK_SNAPSHOT, 1, KEYEVENTF_KEYUP, 0) Printer.Print lHeight = (Printer.ScaleWidth / Screen.Width) * Screen.Height Printer.PaintPicture Clipboard.GetData, 0, 0, Printer.ScaleWidth, lHeight Printer.EndDoc End Sub