Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.80 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <ScreenCapture.au3>
  3. #include <WindowsConstants.au3>
  4.  
  5. AutoItSetOption("GUIOnEventMode", 1)
  6.  
  7. $Width = @DesktopWidth/2
  8. $Height = @DesktopHeight/2
  9. $Form = GUICreate("GUI", $Width, $Height, -1, -1)
  10. $Pic= GUICtrlCreatePic("", 0, 0, $Width, $Height)
  11. GUISetState(@SW_SHOW)
  12.  
  13. $hCtrl = GUICtrlGetHandle($Pic)
  14. $hGUI_DC = _WinAPI_GetDC($Form)
  15. $hDC = _WinAPI_GetDC(0)
  16. _WinAPI_SetStretchBltMode($hGUI_DC, $STRETCH_HALFTONE)
  17.  
  18. GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
  19.  
  20. While 1
  21.     $Timer = TimerInit()
  22.     _WinAPI_StretchBlt($hGUI_DC, 0, 0, $Width, $Height, $hDC, 0, 0, @DesktopWidth, @DesktopHeight, $SRCCOPY)
  23.     ToolTip(TimerDiff($Timer))
  24. WEnd
  25.  
  26. Func _Exit()
  27.     _WinAPI_ReleaseDC($Form, $hGUI_DC)
  28.     _WinAPI_ReleaseDC(0, $hDC)
  29.     GUIDelete()
  30.     Exit
  31. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement