Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

capturing a screenshot ...

Status
Not open for further replies.

thebag

Programmer
Aug 25, 2001
3
AU
hey,

I was wondering how I capture a picture of just the form and then send it electronically as an email? So then it can be printed....

Also

How do I print out a screen in the middle of a page?

thanks

thebag
 
Hi,
Try a little utility that resides in the task bar called PrintKey. I think its freeware. It's just a small .exe that you double-click and it lets you capture and size anything on your desktop. Powerful little program.
You can get it from "downloads\utilities" at Cheers, Thanks in advance for your response(s)!
Cheers,
Lyle1
 
Here's one method of capturing:
[tt]
Option Explicit

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 = &H12
Private Const VK_SNAPSHOT = &H2C
Private Const KEYEVENTF_KEYUP = &H2

' Captures full screen, unless CurrentWindow is set to True, in which case
' active window is captured. Captured image is returned as StdPicture
Private Function SnapShot(Optional CurrentWindow As Boolean) As StdPicture

' Simulate pressing appropriate keys
If CurrentWindow Then keybd_event VK_MENU, 0, 0, 0
keybd_event VK_SNAPSHOT, 1, 0, 0

' Let the system respond
DoEvents

' Unpress the keys
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
If CurrentWindow Then keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
Set SnapShot = Clipboard.GetData

End Function
[/tt]
 
I think that you could just use the "Print Screen" button on your keyboard. I have done this many times. It captures your entire screen, and saves it to the clipboard. You can then go to paint, or some other photo management, and paste it. You can cut off all of the outside junk, and just leave the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top