Results 1 to 11 of 11

Thread: bitmap/graphic operations

Threaded View

  1. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: bitmap/graphic operations

    Every control has a DrawToBitmap method, which copies the control to a bitmap even when it is partly or fully hidden by another control. Here's an example in the form of a function:
    Code:
    Private Function SnapShot(ByVal ctrl As Control) As Bitmap
         Dim bmp As Bitmap
         With ctrl
    	bmp = New Bitmap(.Width, .Height)
    	.DrawToBitmap(bmp, New Rectangle(0, 0, .Width, .Height))
         End With
         Return bmp
    End Function
    It works for most if not all controls apart from RichTextBoxes.

    BB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width