UdtRect.Right - udtRect.Left, udtRect.Bottom - udtRect.Top), _ Stdole.SavePicture hDCToPicture(GetDC(0&), udtRect.Left, udtRect.Top, _ Sleep 3000 '3 sekunden pause um ein anderes Fenster zu aktivieren Public Sub prcSave_Picture_Active_Window() 'aktives Fenster ThisWorkbook.Path & "\Screenshot.bmp" 'anpassen !!! GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)), _ Stdole.SavePicture hDCToPicture(GetDC(0&), 0&, 0&, _ Public Sub prcSave_Picture_Screen() 'ganzer bildschirm Private Declare Function GetForegroundWindow Lib "user32.dll" () As Long Private Declare Function GetSystemMetrics Lib "user32.dll" ( _ Private Declare Function GetWindowRect Lib "user32.dll" ( _ Private Declare Function GetDC Lib "user32.dll" ( _ Private Declare Function DeleteDC Lib "gdi32.dll" ( _ Private Declare Function BitBlt Lib "gdi32.dll" ( _ Private Declare Function RealizePalette Lib "gdi32.dll" ( _ Private Declare Function SelectPalette Lib "gdi32.dll" ( _ Private Declare Function CreatePalette Lib "gdi32.dll" ( _īyRef lpLogPalette As LOGPALETTE) As Long Private Declare Function GetSystemPaletteEntries Lib "gdi32.dll" ( _īyRef lpPaletteEntries As PALETTEENTRY) As Long Private Declare Function GetDeviceCaps Lib "gdi32.dll" ( _ Private Declare Function SelectObject Lib "gdi32.dll" ( _ Private Declare Function CreateCompatibleBitmap Lib "gdi32.dll" ( _ Private Declare Function CreateCompatibleDC Lib "gdi32.dll" ( _ Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" ( _ Private Declare Sub Sleep Lib "kernel32.dll" ( _ PrcSave_Picture_Active_Window 3 seconds (which is adjustable)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |