VB Screen to Word

I need to include some VB form images into Word.  I can clipboard them, but that grabs the whole screen, makes the document huge, and the image has to be cropped each time to remove the extra desktop image.  

I am wondering if there's another tool that's easier and more flexible to work with.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

A program called SnagIt will allow you to simply capture certain windows:


Or this code will capture a Form in your vb project:

Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

Public Const SRCCOPY = &HCC0020
Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long

  Dim ScreenHandle As Long
  Const NEWFRAME = 1
  Const PIXEL = 3
  '* StretchBlt requires pixel coordinates.
  Picture1.ScaleMode = PIXEL
  Printer.ScaleMode = PIXEL
  Form1.ScaleMode = PIXEL
  ScreenHandle = Form1.hwnd
  apierror& = StretchBlt(Picture1.hdc, Picture1.ScaleLeft, Picture1.ScaleTop, 10000, 9350, GetDC(ScreenHandle), 0, 0, Form1.Width, Form1.Height, SRCCOPY)
  Picture1.Picture = Picture1.Image

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You can only capture the current window by pressing ALT-PrintScreen twice.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.