Lupenfunktion ohne Flimmern?

  • Hi,
    habe die Lupenfunktion entdeckt. Sie wurde in älteren Posts mehrfach erwähnt.

    Wie bekomme ich es hin, dass der Ausschnitt nicht mehr flimmert?
    Außerdem stimmt der Ausschnitt nicht zu dem tatsächlichen ausgewählten auf dem Desktop (nur minimal Unterschiede)
    Gut wäre noch, wenn das Vorschaufenster nicht unten aus dem Bildschirm verschwindet

    Spoiler anzeigen
    [autoit]

    #include<GUIConstants.au3>
    #include<Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Dim $left, $top, $width, $height, $MyhWnd

    [/autoit] [autoit][/autoit] [autoit]

    _auswahl()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;********************************************
    ; Auswahl (nur für Bereich) *
    ;********************************************

    [/autoit] [autoit][/autoit] [autoit]

    Func _auswahl()
    Global $left, $top, $width, $height
    $AuswahlGUI = GUICreate("ScreenShot", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)); erstellen eines GUI-Fensters
    GUISetCursor(3, 1, $AuswahlGUI); Mouse-Cursor umschalten, Kreuz
    GUISetState(); öffnen des GUI-Fensters
    WinSetTrans("ScreenShot", "", 20)

    Local $UserDLL = DllOpen("user32.dll"); öffnen der User32.dll

    ; Infotext anzeigen:
    SplashTextOn('Info: ', 'Bitte markieren Sie den Bereich, von dem Sie einen ScreenShot erstellt haben wollen. ', 400, 50, (@DesktopWidth / 2) - 200, (@DesktopHeight / 2) - 25)
    Sleep(2000)
    SplashOff()

    While 1
    If _IsPressed("01", $UserDLL) Then
    Local $Start_Pos = MouseGetPos()
    draw_label()
    ExitLoop
    EndIf
    WEnd

    While 1
    If Not _IsPressed("01", $UserDLL) Then
    Local $End_Pos = MouseGetPos()
    SplashOff()
    ToolTip("")
    ;rechts oben nach links unten:
    If $End_Pos[0] > $Start_Pos[0] And $End_Pos[1] > $Start_Pos[1] Then
    $left = $Start_Pos[0]
    $top = $Start_Pos[1]
    $width = $End_Pos[0] - $Start_Pos[0]
    $height = $End_Pos[1] - $Start_Pos[1]
    EndIf
    ;rechts unten nach links oben:
    If $End_Pos[0] > $Start_Pos[0] And $End_Pos[1] < $Start_Pos[1] Then
    $left = $Start_Pos[0]
    $top = $End_Pos[1]
    $width = $End_Pos[0] - $Start_Pos[0]
    $height = $Start_Pos[1] - $End_Pos[1]
    EndIf
    ;links oben nach rechts unten:
    If $End_Pos[0] < $Start_Pos[0] And $End_Pos[1] > $Start_Pos[1] Then
    $left = $End_Pos[0]
    $top = $Start_Pos[1]
    $width = $Start_Pos[0] - $End_Pos[0]
    $height = $End_Pos[1] - $Start_Pos[1]
    EndIf
    ;links unten nach rechts oben:
    If $End_Pos[0] < $Start_Pos[0] And $End_Pos[1] < $Start_Pos[1] Then
    $left = $End_Pos[0]
    $top = $End_Pos[1]
    $width = $Start_Pos[0] - $End_Pos[0]
    $height = $Start_Pos[1] - $End_Pos[1]
    EndIf
    ExitLoop
    EndIf
    WEnd
    DllClose($UserDLL)
    GUISetCursor(2, 0); Mouse-Cursor umschalten, Pfeil
    GUIDelete()
    EndFunc ;==>_auswahl()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;*********************************************
    ; Auswahlbereich anzuzeigen *
    ;*********************************************

    [/autoit] [autoit][/autoit] [autoit]

    Func draw_label()
    Local $User1DLL = DllOpen("user32.dll")
    Local $MouseCoordMode, $Start_Pos1, $Ausschnitt, $Mouse_Pos

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $MouseCoordMode = Opt('MouseCoordMode', 2)
    $Start_Pos1 = MouseGetPos()
    $Ausschnitt = GUICtrlCreateLabel('', 0, 0, 1, 1, $SS_SUNKEN)
    GUICtrlSetBkColor($Ausschnitt, 0)

    [/autoit] [autoit][/autoit] [autoit]

    While _IsPressed("01", $User1DLL)
    $Mouse_Pos = MouseGetPos()
    Local $Pos_Lupe = MouseGetPos()
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] + 20, $Pos_Lupe[1] + 120)
    Local $Lupe = SplashTextOn("Lupe", "", 100, 100, $Pos_Lupe[0] + 20, $Pos_Lupe[1] + 20, 1)
    Global $MyhWnd = WinGetHandle("Lupe")
    Lupe()

    ;links oben nach rechts unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0], $Start_Pos1[1], $Mouse_Pos[0] - $Start_Pos1[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf
    ;links unten nach rechts oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0], $Mouse_Pos[1], $Mouse_Pos[0] - $Start_Pos1[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf
    ;rechts oben nach links unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0], $Start_Pos1[1], $Start_Pos1[0] - $Mouse_Pos[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf
    ;rechts unten nach links oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0], $Mouse_Pos[1], $Start_Pos1[0] - $Mouse_Pos[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf
    WEnd

    Opt('MouseCoordMode', $MouseCoordMode)
    Return $Ausschnitt
    Sleep(10)
    WEnd
    DllClose($User1DLL)
    EndFunc ;==>draw_label()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;*********************************
    ; Bildschirmlupe *
    ;*********************************

    [/autoit] [autoit][/autoit] [autoit]

    Func Lupe()
    Global $MyHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $MyhWnd)
    If @error Then Return
    Global $DeskHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", 0)
    If Not @error Then
    $xy = MouseGetPos()
    If Not @error Then
    $l = $xy[0] - 10
    $t = $xy[1] - 10
    DllCall("gdi32.dll", "int", "StretchBlt", "int", $MyHDC[0], "int", 0, "int", 0, "int", 100, "int", 100, "int", $DeskHDC[0], "int", $l, "int", $t, "int", 20, "int", 20, "long", $SRCCOPY)
    EndIf
    DllCall("user32.dll", "int", "ReleaseDC", "int", $DeskHDC[0], "hwnd", 0)
    EndIf
    DllCall("user32.dll", "int", "ReleaseDC", "int", $MyHDC[0], "hwnd", $MyhWnd)
    EndFunc ;==>Lupe()

    [/autoit]
  • Hi Tweaky,

    ich habe mal ein wenig herumprobiert ...
    SplashTextOn ist in zu vielen Schleifen und wird jedesmal neu gezeichnet.
    Ich habe das Flimmern etwas herausbekommen, zumindest bei der Lupe ... ;)

    Spoiler anzeigen
    [autoit]

    ;*********************************************
    ; Auswahlbereich anzuzeigen *
    ;*********************************************

    [/autoit] [autoit][/autoit] [autoit]

    Func draw_label()
    Local $User1DLL = DllOpen("user32.dll")
    Local $MouseCoordMode, $Start_Pos1, $Ausschnitt, $Mouse_Pos
    $Ausschnitt = GUICtrlCreateLabel('', 0, 0, 1, 1, $SS_SUNKEN)
    GUICtrlSetBkColor($Ausschnitt, 0)

    [/autoit] [autoit][/autoit] [autoit]

    $MouseCoordMode = Opt('MouseCoordMode', 2)
    $Start_Pos1 = MouseGetPos()
    Local $Pos_Lupe = MouseGetPos()
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] + 20, $Pos_Lupe[1] + 120)
    Local $Lupe = SplashTextOn("Lupe", "", 100, 100, $Pos_Lupe[0] + 20, $Pos_Lupe[1] + 20, 1)
    Global $MyhWnd = WinGetHandle("Lupe")
    While 1

    [/autoit] [autoit][/autoit] [autoit]

    While _IsPressed("01", $User1DLL)
    $Mouse_Pos = MouseGetPos()
    $Pos_Lupe = MouseGetPos()
    Lupe()

    ;links oben nach rechts unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0], $Start_Pos1[1], $Mouse_Pos[0] - $Start_Pos1[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf
    ;links unten nach rechts oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0], $Mouse_Pos[1], $Mouse_Pos[0] - $Start_Pos1[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf
    ;rechts oben nach links unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0], $Start_Pos1[1], $Start_Pos1[0] - $Mouse_Pos[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf
    ;rechts unten nach links oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0], $Mouse_Pos[1], $Start_Pos1[0] - $Mouse_Pos[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf
    WEnd

    Opt('MouseCoordMode', $MouseCoordMode)
    Return $Ausschnitt
    Sleep(10)
    WEnd
    DllClose($User1DLL)
    EndFunc ;==>draw_label()

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Gruß
    Greenhorn


  • Gut das flimmern ist weg.
    Leider wird nun die Größenangabe des ausgewählten Bereichs auch nicht mehr aktualisiert und der Ausschnitt wandert nicht mehr mit :(

    Ist es normal, dass wenn ich links oben im Bildschirm starte, dass dann X-Pos: 1 und Y-Pos: 19 ist ?(
    EDIT: habs Posting ä bisserle gerändert, meinte die Größenangabe des Bereichs

  • Hi ;)
    war schon fleißig im neuen Jahr :)

    schauts euch mal an. Denke es dürfte so funktionieren.

    Spoiler anzeigen
    [autoit]

    #include<Misc.au3>
    #include<GUIConstants.au3>
    #include<ScreenCapture.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Dim $left, $top, $width, $height, $MyhWnd
    $datei = "C:\test lupe.jpg"

    [/autoit] [autoit][/autoit] [autoit]

    _auswahl()
    _ScreenCapture_Capture($datei, $left, $top, $width+$left, $height+$top, False)
    ShellExecute($datei)
    Sleep(2000)
    FileDelete($datei)

    [/autoit] [autoit][/autoit] [autoit]

    ;********************************************
    ; Auswahl (nur für Bereich) *
    ;********************************************

    [/autoit] [autoit][/autoit] [autoit]

    Func _auswahl()
    Global $left, $top, $width, $height
    $AuswahlGUI = GUICreate("ScreenShot", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)); erstellen eines GUI-Fensters
    GUISetCursor(3, 1, $AuswahlGUI); Mouse-Cursor umschalten, Kreuz
    GUISetState(); öffnen des GUI-Fensters
    WinSetTrans("ScreenShot", "", 20)

    Local $UserDLL = DllOpen("user32.dll"); öffnen der User32.dll

    ; Infotext anzeigen:
    SplashTextOn('Info: ', 'Bitte markieren Sie den Bereich, von dem Sie einen ScreenShot erstellt haben wollen. ', 400, 50, (@DesktopWidth / 2) - 200, (@DesktopHeight / 2) - 25)
    Sleep(2000)
    SplashOff()

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    If _IsPressed("01", $UserDLL) Then
    Local $Start_Pos = MouseGetPos()
    draw_label()
    ExitLoop
    EndIf
    WEnd

    While 1
    If Not _IsPressed("01", $UserDLL) Then
    Local $End_Pos = MouseGetPos()
    SplashOff()
    ToolTip("")
    ;rechts oben nach links unten:
    If $End_Pos[0] > $Start_Pos[0] And $End_Pos[1] > $Start_Pos[1] Then
    $left = $Start_Pos[0]
    $top = $Start_Pos[1]
    $width = $End_Pos[0] - $Start_Pos[0]
    $height = $End_Pos[1] - $Start_Pos[1]
    EndIf
    ;rechts unten nach links oben:
    If $End_Pos[0] > $Start_Pos[0] And $End_Pos[1] < $Start_Pos[1] Then
    $left = $Start_Pos[0]
    $top = $End_Pos[1]
    $width = $End_Pos[0] - $Start_Pos[0]
    $height = $Start_Pos[1] - $End_Pos[1]
    EndIf
    ;links oben nach rechts unten:
    If $End_Pos[0] < $Start_Pos[0] And $End_Pos[1] > $Start_Pos[1] Then
    $left = $End_Pos[0]
    $top = $Start_Pos[1]
    $width = $Start_Pos[0] - $End_Pos[0]
    $height = $End_Pos[1] - $Start_Pos[1]
    EndIf
    ;links unten nach rechts oben:
    If $End_Pos[0] < $Start_Pos[0] And $End_Pos[1] < $Start_Pos[1] Then
    $left = $End_Pos[0]
    $top = $End_Pos[1]
    $width = $Start_Pos[0] - $End_Pos[0]
    $height = $Start_Pos[1] - $End_Pos[1]
    EndIf
    ExitLoop
    EndIf
    WEnd
    DllClose($UserDLL)
    GUISetCursor(2, 0); Mouse-Cursor umschalten, Pfeil
    GUIDelete() ;2x notwendig, da 2 Guis vorhanden
    GUIDelete() ;2x notwendig, da 2 Guis vorhanden
    EndFunc ;==>_auswahl()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;*********************************************
    ; Auswahlbereich anzuzeigen *
    ;*********************************************

    [/autoit] [autoit][/autoit] [autoit]

    Func draw_label()
    Local $User1DLL = DllOpen("user32.dll")
    Local $MouseCoordMode, $Start_Pos1, $Ausschnitt, $Mouse_Pos

    $Ausschnitt = GUICtrlCreateLabel('', 0, 0, 1, 1, $SS_SUNKEN) ;kennzeichnet den Bereich, der später fotografiert wird
    GUICtrlSetBkColor($Ausschnitt, 0)

    $x_gui = 100 ;Größe des Vergrößerungsfensters
    $y_gui = 100 ;Größe des Vergrößerungsfensters
    $lupe = GUICreate("Lupe", $x_gui, $y_gui, 500, 500, $WS_POPUPWINDOW) ; Vergrößerungsfensters
    $strich1 = GUICtrlCreateLabel("", 0, 48, 100, 2) ;Kennzeichnung der Mitte des Vergrößerungsfensters
    $strich2 = GUICtrlCreateLabel("", 48, 0, 2, 100) ;Kennzeichnung der Mitte des Vergrößerungsfensters
    GUICtrlSetBKColor($strich1, 0x000000) ;Farbe der Mittelmarkierung ändern
    GUICtrlSetBKColor($strich2, 0x000000) ;Farbe der Mittelmarkierung ändern
    GUISetState()

    $x_verschieben = 120 ;um wie viel das Vergrößerungsfenster in X verschoben werden soll, wenn der Cursor zu nah an den Bildschirmrand kommt
    $y_verschieben = 120 ;um wie viel das Vergrößerungsfenster in Y verschoben werden soll, wenn der Cursor zu nah an den Bildschirmrand kommt
    $x_versatz = 10 ;Versatz des Vergrößerungsfensters zum Cursor in X
    $y_versatz = 10 ;Versatz des Vergrößerungsfensters zum Cursor in Y
    $y_versatz_nur_unten = 30 ;um wie viel das Vergrößerungsfenster in Y verschoben werden soll, wenn der Cursor zu nah an den Bildschirmrand kommt (zusätzlich, nur unten)
    $y_tipp = $y_gui + $y_versatz ;um wie viel dasFeld mit x und y Anzeige zum Cursor in Y verschoben sein soll
    $tipp_hoehe = 50 ;Höhe des Feldes mit x und y Anzeige

    While 1
    $MouseCoordMode = Opt('MouseCoordMode', 1)
    $Start_Pos1 = MouseGetPos()

    [/autoit] [autoit][/autoit] [autoit]

    While _IsPressed("01", $User1DLL)
    $Mouse_Pos = MouseGetPos()
    Local $Pos_Lupe = MouseGetPos()
    WinMove("Lupe", "", $x_verschieben + $Mouse_Pos[0], $y_verschieben + $Mouse_Pos[1])
    Global $MyhWnd = WinGetHandle("Lupe")
    Lupe()

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($strich1, $GUI_ENABLE)
    GUICtrlSetState($strich2, $GUI_ENABLE)

    If $Mouse_Pos[0] < @DesktopWidth -200 And $Mouse_Pos[1] < @DesktopHeight -200 Then
    $x_verschieben = $x_versatz
    $y_verschieben = $y_versatz
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] +$x_verschieben, $Pos_Lupe[1] +$y_versatz +$y_tipp)
    EndIf

    If $Mouse_Pos[0] > @DesktopWidth -200 And $Mouse_Pos[1] < @DesktopHeight -200 Then
    $x_verschieben = -$x_versatz -$x_gui
    $y_verschieben = $y_versatz
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] -$x_versatz -$x_gui, $Pos_Lupe[1] +$y_versatz +$y_tipp)
    EndIf

    If $Mouse_Pos[0] < @DesktopWidth -200 And $Mouse_Pos[1] > @DesktopHeight -200 Then
    $x_verschieben = $x_versatz
    $y_verschieben = -$y_versatz -$y_gui -$y_versatz_nur_unten
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] +$x_versatz, $Pos_Lupe[1] -$y_versatz -$y_tipp -$tipp_hoehe -$y_versatz_nur_unten)
    EndIf

    If $Mouse_Pos[0] > @DesktopWidth -200 And $Mouse_Pos[1] > @DesktopHeight -200 Then
    $x_verschieben = -$x_versatz -$x_gui
    $y_verschieben = -$y_versatz -$y_gui -$y_versatz_nur_unten
    Local $Pos_Screen = ToolTip("X-Pos.: " & $Pos_Lupe[0] & @LF & "Y-Pos.: " & $Pos_Lupe[1] & @LF & "Breite: " & $Pos_Lupe[0] - $Start_Pos1[0] & @LF & "Höhe: " & $Pos_Lupe[1] - $Start_Pos1[1], $Pos_Lupe[0] -$x_versatz -$x_gui, $Pos_Lupe[1] -$y_versatz -$y_tipp -$tipp_hoehe -$y_versatz_nur_unten)
    EndIf

    ;links oben nach rechts unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0]+1, $Start_Pos1[1]+19, $Mouse_Pos[0] - $Start_Pos1[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf

    ;links unten nach rechts oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] > $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Start_Pos1[0]+1, $Mouse_Pos[1]+19, $Mouse_Pos[0] - $Start_Pos1[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf

    ;rechts oben nach links unten:
    If $Mouse_Pos[1] > $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0]+1, $Start_Pos1[1]+19, $Start_Pos1[0] - $Mouse_Pos[0], $Mouse_Pos[1] - $Start_Pos1[1])
    Sleep(10)
    EndIf

    ;rechts unten nach links oben:
    If $Mouse_Pos[1] < $Start_Pos1[1] And $Mouse_Pos[0] < $Start_Pos1[0] Then
    GUICtrlSetPos($Ausschnitt, $Mouse_Pos[0]+1, $Mouse_Pos[1]+19, $Start_Pos1[0] - $Mouse_Pos[0], $Start_Pos1[1] - $Mouse_Pos[1])
    Sleep(10)
    EndIf
    WEnd
    Opt('MouseCoordMode', $MouseCoordMode)
    Return $Ausschnitt
    Sleep(10)
    WEnd
    DllClose($User1DLL)
    EndFunc ;==>draw_label()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;*********************************
    ; Bildschirmlupe *
    ;*********************************

    [/autoit] [autoit][/autoit] [autoit]

    Func Lupe()
    Global $MyHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $MyhWnd)
    If @error Then Return
    Global $DeskHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", 0)
    If Not @error Then
    $xy = MouseGetPos()
    If Not @error Then
    $l = $xy[0] - 10
    $t = $xy[1] - 10
    DllCall("gdi32.dll", "int", "StretchBlt", "int", $MyHDC[0], "int", 0, "int", 0, "int", 100, "int", 100, "int", $DeskHDC[0], "int", $l, "int", $t, "int", 20, "int", 20, "long", $SRCCOPY)
    EndIf
    DllCall("user32.dll", "int", "ReleaseDC", "int", $DeskHDC[0], "hwnd", 0)
    EndIf
    DllCall("user32.dll", "int", "ReleaseDC", "int", $MyHDC[0], "hwnd", $MyhWnd)
    EndFunc ;==>Lupe()

    [/autoit]