Results 1 to 3 of 3

Thread: Take a screenshot and save to bitmap

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    13

    Take a screenshot and save to bitmap

    Hi,

    I'm having an issue with some code I'm trying to write that takes a screenshot of the current screen and saves it to a bitmap file on my local PC.
    vb.net Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
    2. Handles Button1.Click
    3.  
    4. Dim tempScreenshot = New Bitmap(Screen.PrimaryScreen.Bounds.Width, _
    5. Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb)
    6.  
    7. tempScreenshot.Save("C:\test.bmp")
    8.  
    9. End Sub

    I'm running Windows 7, could there be some type of administrator issue? I don't get any errors ... can someone please help since this must be something simple.
    Last edited by Hack; Dec 29th, 2010 at 06:53 AM. Reason: Added Highlight Tags

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