Home » questions » Screenshot?

Screenshot?

2006-08-10 17:34:00, Category: Programming & Design
I am using Visual Basic 6.0 and want to know how to take a screenshot of the Desktop and then have it as the Form.Picture property. Oops, guess I didn't specify that I need to do this from WITHIN the program. :-) Doh, guess it's still not quite clear lol. I want the program, at run-time, to take a screenshot of the desktop and load it as the Form.Picture property *automatically* (through coding). I just want to know how to write the code to take the screenshot and then load it into the Form.Picture property.

Answers

  1. Terminator

    On 2006-08-16 06:01:56


    hit the key and open paint program then ctrl+v and save it. then open it
  2. boredatwork

    On 2006-08-16 09:46:43


    #1 You can use this vb code to simulate the pressing of a certain key within the vb program: http://www.thevbzone.com/modKeyboard.bas #2 This is a free screen capture program (ScreenHunter): http://www.wisdom-soft.com/products/screenhunter.htm You can configure this program to screen capture when a certain key is pressed. More importantly, you can configure it to save this captured image to a physical location on your computer. See where I'm going? You have ScreenHunter running on your computer (it pretty much runs in the background and is barely noticeable, it'll just be an icon sitting in your tray). You configure ScreenHunter to screen capture and save the image to a location on your computer when a key (let's say F6) is pressed. In your vb code, use the code in #1 to simulate the pressing of the F6 key when the program loads. Put a time delay in your code to ensure that ScreenHunter had enough time to screen capture and save the image. Then set your Form.Picture property to point to the physical location where ScreenHunter saved the image.
  3. teabagme

    On 2006-08-10 17:49:55


    hit the print scrn key and open paint program then ctrl+v.
  4. k_banerjee2002

    On 2006-08-11 05:54:09


    hit the print scrn key and open paint program then ctrl+v
  5. kryptonboy22

    On 2006-08-10 18:44:44


    alt+printscreen on your keyboard. then open paint or word then paste it or hit Ctrl+v. it will let your capture only the form not the whole desktop