Results 1 to 8 of 8

Thread: full screen to clipboard (instead of active window)

  1. #1

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526

    full screen to clipboard (instead of active window)

    Is there a quick way to do this?
    ~ mikeycorn

    With over 45,000 Questions in the User Submitted Database, it's the Most Popular Quiz Creation Software on the Net:

    PEST - The Personal Exam Self-Tester

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Yes, instead to giving it HWND of the window, you give the HWND of the desktop by first getting the HWND using "GetDesktopWindow()".
    Baaaaaaaaah

  3. #3

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526
    uh oh . . . I've been using alt + print screen, I'm not too clear on HWND and GetDesktopWindow().
    ~ mikeycorn

    With over 45,000 Questions in the User Submitted Database, it's the Most Popular Quiz Creation Software on the Net:

    PEST - The Personal Exam Self-Tester

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Oh ok, If you are using that method, then instead of using "alt + print", use "print".
    Baaaaaaaaah

  5. #5
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141
    Here is a quick example
    VB Code:
    1. Option Explicit
    2. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
    3. ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    4.  
    5. Private Const VK_SNAPSHOT = &H2C
    6.  
    7. Private Sub Command1_Click()
    8.     Clipboard.Clear
    9.     '   Get the Entire Screen
    10.     keybd_event vbKeySnapshot, 1, 0, 0
    11. End Sub
    12.  
    13. Private Sub Command2_Click()
    14.     Clipboard.Clear
    15.     '   Get the Active Window
    16.     keybd_event vbKeySnapshot, 0, 0, 0
    17. End Sub
    18.  
    19. Private Sub Form_Load()
    20.     Command1.Caption = "Full Screen"
    21.     Command2.Caption = "Active Window"
    22. End Sub

  6. #6

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526
    LOL . . . Let me get this straight, you mean I've got to press Print Screen instead of Alt + Print Screen??? Wait a minute, let me write that down . . . (How could I not have at least tried that?)

    The code snipped is pretty handy, too. Thanks guys!
    ~ mikeycorn

    With over 45,000 Questions in the User Submitted Database, it's the Most Popular Quiz Creation Software on the Net:

    PEST - The Personal Exam Self-Tester

  7. #7
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    gee i thought everyone knew that i knew when i was 10!
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  8. #8

    Thread Starter
    Fanatic Member mikeycorn's Avatar
    Join Date
    Jun 2000
    Location
    Aliso Viejo, CA, USA
    Posts
    526
    Bug off I'd always used alt + print screen, okay?



    ~ mikeycorn

    With over 45,000 Questions in the User Submitted Database, it's the Most Popular Quiz Creation Software on the Net:

    PEST - The Personal Exam Self-Tester

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