Zippie

My feedback

  1. 1,973 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    305 comments  ·  Public » Meetings  ·  Flag idea as inappropriate…  ·  Admin →
    Zippie supported this idea  · 
    An error occurred while saving the comment
    Zippie commented  · 

    'Attach a File' didn't succeed. Here is the script source:
    ------------
    #include <ScreenCapture.au3>
    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>

    Local $w = 960 ;1712
    Local $h = 540 ; 963
    Local $yOffset = 60

    Local $hGUI = GUICreate("Screen Proxy", $w, $h, $w, $yOffset, BitOR($WS_BORDER,$WS_POPUP))

    GUISetState()
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUIRegisterMsg($WM_NCRBUTTONDOWN, "WM_NCRBUTTONDOWN")

    _GDIPlus_Startup()
    Local $exitFlag=0;

    While 1
    Local $iMsg = GUIGetMsg()

    ; Capture top left corner of the screen plus y offset
    Local $hBMP = _ScreenCapture_Capture("", 0, $yOffset, $w, $h + $yOffset)

    Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBMP)

    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0)

    _GDIPlus_ImageDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hGraphic)
    _WinAPI_DeleteObject($hBMP)

    If $iMsg = $GUI_EVENT_CLOSE Or $exitFlag = -1 Then ExitLoop

    Sleep(10)
    WEnd

    _GDIPlus_Shutdown()

    Func WM_NCHITTEST($hWnd, $iMsg, $iParam, $lParam)
    #forceref $iMsg, $iParam, $lParam
    If $hWnd = $hGUI Then Return $HTCAPTION
    EndFunc

    Func WM_NCRBUTTONDOWN($hWnd, $iMsg, $iParam, $lParam)
    If MsgBox($MB_TASKMODAL+$MB_ICONWARNING+$MB_YESNO, "", "Exit screen capture?") = 6 Then $exitFlag = -1
    EndFunc

    An error occurred while saving the comment
    Zippie commented  · 

    I'll be glad to get this feature in Teams some day.
    Since I couldn't find an applicable solution, I made a workaround script, which I use to share a part of my desktop via 'Share content->Window'. I'm attaching it here in case it can be of any help to others.

    Short description: It is an AutoIt script. Adjust the width and height of the desired capture area and share the 'Screen proxy' app window via Teams. Overlapping the app window doesn't affect sharing. It is not for use with the 'Request/Allow Control' Teams feature. Also, it could be easily compiled to an exe, if one wants to avoid AutoIt installation.

Feedback and Knowledge Base