Want to hide Zoom window using C# SDK

I want to either Hide default Zoom window while hosting a new meeting or want to make this code working:

StartParam4NormalUser normalUser = new StartParam4NormalUser();
normalUser.meetingNumber = 1234567890;
normalUser.isDirectShareDesktop = true;
normalUser.hDirectShareAppWnd = …??? //Process.GetCurrentProcess().MainWindowHandle;

Ho can i assign a window here so while hosting a meeting, it will not ask me to select a window…
I want default to be my custom application or screen, anything…

Hi @wbx440, thanks for using our SDK.

Apologies, but I’m a little unclear on what is being asked here. Are you referring to the window selection screen when trying to start a screen share? Feel free to provide a screenshot if it helps clarify. :slightly_smiling_face:

Thanks!

When I start a meeting using the above code, I get these 2 windows visible:

then…

So I have to now tick Share Sound & then click Share Button.

My requirement is that If I can hide these 2 windows & make these working from code only…
If 1st window can’t be hidden then I can still manage, but 2nd window should not appear…
for this I want to make this code working:
normalUser.hDirectShareAppWnd = … ← but here on right hand side what to write ?

If i want my application screen to be selected then I will get its window handle using code:
Process.GetCurrentProcess().MainWindowHandle
But now how to convert it to HWNDDotNet ? so i can assign it to normalUser.hDirectShareAppWnd ??

And not understand, why its asking for Share Sound, even I have coded it like this:
meetingShareController = mService.GetMeetingShareController();
meetingShareController.EnableShareComputerSound(true);
meetingShareController.StartSharePureComputerAudio();

One more thing here, If i try to use this code:
SDKError shareError = meetingShareController.StartMonitorShare(“My Monitor Id that I receive from System.Management library”);

then it shows shareError = 15, that is even not listed in SDKError enum, there we have 0-14 codes only… I was thinking if Monitor share code would work then may be possible that 2nd screen would not appear…

So I don’t want this 2nd window to appear at all & 1st also if possible…

Hi @wbx440,

Thanks for clarifying! I think I understand what you’re asking now.

My requirement is that If I can hide these 2 windows & make these working from code only…

This sounds like a perfect use case for the SDK’s custom UI mode. The downside of custom UI is that the SDK itself will not display any UI elements unless explicitly told to do so, meaning that there is usually a lot more overhead when implementing. Since you’re saying you don’t want to show the meeting UI and all and wish to just start sharing the screen, the additional overhead may not even be an issue for you. For information on how to enable custom UI mode, see our custom UI documentation.

After joining a meeting successfully (which you would confirm based on the onMeetingStatusChanged callback), you could programmatically start the share. Let me know if you’re still seeing any issues with this approach and we can look into this further.

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.