![]() ![]() |
Sep 22 2005, 07:05 PM
Post
#1
|
|
![]() Member ![]() ![]() ![]() Group: Members Posts: 398 Joined: 27-August 02 Member No.: 690 Which Program?: DNS 8.0 Where are you Located: San Diego |
Here is a little macro to copy the active Window to MS paint. It uses a Windows API call to do a "Print Screen". It then opens Paint (or you can change to any program) and pastes the Window. I used it to create the thumbnail below. Code: Option Explicit Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _ bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_KEYUP = &H2 Private Const VK_SNAPSHOT = &H2C Private Const VK_MENU = &H12 Sub Main keybd_event VK_SNAPSHOT, 1, 0, 0 'capture active window 'keybd_event VK_SNAPSHOT, 0, 0, 0 'capture entire screen AppBringUp "mspaint" 'Opens MS Paint Wait .5 SendKeys "^V", True 'Pastes Picture into Paint SendKeys "{Enter}" 'Presses Enter in case Paint wants to resize End Sub If you want to import the macro, download the file and change it from .txt to .dat |