Visual Basic (VB6 and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

Visual Basic Library

This page was last updated on Saturday, November 24, 2001

Public Function ActiveWindowToClipboard() ' Procedure : ActiveWindowToClipboard ' Description: Simulate the Alt-PrtScr key combination. ' Copyright: Chris Greaves Inc. ' Inputs: None ' Returns: None. ' Assumes: None. ' Side Effects: Clipboard contents change. ' Tested: By a call from the user. 'This code compliments of Q240653 & Kevin Paddock of www.wopr.com (Woody's Lounge) keybd_event VK_SNAPSHOT, 0, 0, 0 ' To test this code, indulge me: ' Run the macro, then open up Paint, Paintbrush, or any other graphics editor ' and within the graphics editor choose Edit Paste. ' You should see a snapshot of PART OF the screen as it was at the time you ran the macro. ' ' I suppose you could use this macro to trap a snapshot at the time an error was detected ' and generate an error report with the screen contents attached. End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Monday, November 19, 2001

 

 

Hosted by www.Geocities.ws

1