Forum Discussion
Sharing part of the screen
- Apr 28, 2021Seem to be not possible at the moment, but heavily requested by user voices: https://microsoftteams.uservoice.com/forums/555103-public/suggestions/38834104-share-custom-area-of-screen
Meanwhile I have created a workaround as well. The app opens two windows, one to allow selecting the area to record, and the other to be shared over Teams. Feel free to use the executable on the https://github.com/mPyKen/ScreenAreaShare/releases/ or checkout the code on https://github.com/mPyKen/ScreenAreaShare.
PyKen Brilliant mate... I was looking for something exactly like this!!
I have a humble request to make this even easier to use. Could you look into:
- Creating the selection rectangle at a desired location, width and height?
(command line parameters: sel_x, sel_y, sel_w, sel_h)
- A command line parameter to control whether the selection rectangle is visible or not? If I dedicate the right half of my ultrawide to sharing via Teams and the program starts up with fixed parameters (sel_x, sel_y, sel_w, sel_h), the selection border need not be visible.
- Moving the Main Window to a desired location (i.e. out of the way)?
(command line parameters: main_x, main_y)
I assume the Main Window must be visible (not hidden) for sharing purposes, otherwise a 'hide main window' parameter could also make sense. Minimizing it doesn't work, because Microsoft Teams will stop sharing any minimized window. So being able to move the Main Window to a location where it's less distracting would be fantastic. Many thanks in advance!
- PyKenNov 26, 2021Copper Contributor
ProMace Thanks for the suggestions!:) I have added these features. After running the setup, you can run it (in case of the desktop link) like this
.\screen-area-share.lnk --cx=0 --cy=0 --cw=1920 --ch=1080 --rx=1920 --ry=0 --rw=1920 --rh=1080 --freeze
AFAIK hiding the main window is not possible. I have tried minimizing it as well. Moving the main window to another workspace does not help either. Currently, the only solution is to simply put another window above it.
- ProMaceNov 26, 2021Copper Contributor
Hi PyKen, thanks again for your effort, much appreciated! 🙂 I'll be testing your updated version over the next few hours.
This morning I tested Teams sharing with my work colleagues and it didn't work as expected, they couldn't see the contents of the Main Window. I set up a Teams call this evening from work to my home account and I found that moving the Main Window 'out of the way' (= outside of the visible desktop) doesn't work. In summary, I found the following on the receiver side of Teams sharing:
1. Nothing is shared if the Main Window is fully covered by another window.
2. The Main Window is fully shared if it is partially covered by another window.
3. If the Main Window is partially pushed outside of the desktop area, only the visible part of the Main Window is shared, zoomed.
4. If the Main Window is minimized, nothing is shown (normal Teams behavior).
5. If the Main Window is hidden, it turns black, as does the shared content (I used WinSpy to get the handle and AutoHotkey to hide the window).
If 3 were not the case, you could just push the Main Window to a place outside of the visible desktop. Is there a way to fully render the Main Window even when it's outside of the visible desktop? Because that would be a perfect! As it stands, when sharing half of my ultrawide screen the other half will be occupied by the Main Window, whereas you'd want to use that space to prepare whatever you're going to drag into the shared rectangle. If you manage to solve that issue, you can start asking $$$ for your solution! 🙂- PyKenNov 29, 2021Copper Contributor
ProMaceThanks for your extensive tests! I have released a small fix for 1.
1 and 2. Thanks, I fixed this in v1.1.1. The window should continue rendering now, even if it is completely covered by other windows.
3. Unfortunately, this is a Teams limitation. A capture in OBS has no problems with it. As a workaround, I made sure the Main Window always stays within the screen.
4. Yes, it seems that Teams stops recording when the window is minimized. I am not sure if it is possible to render while minimized.
5. What do you mean with 'hidden'? Is there another way to cover a window?
If 1 is not a solution for you, you can actually use virtual desktops. A bit complicated to start, but you can move the Main window to another virtual desktop after selecting it for screen sharing!