Windows SDK C# wrapper Keep on Top

I modified zoom_sdk_dotnet_wrap to use DisableTopMostAttr4SettingDialog function,
but it didn’t work.

How can I Keep on Top the zoom SDK client?

Hi @HyoSeong,

Thanks for the post. Are you trying to set the meeting window always on top? Are you calling this interface before or after joining a meeting?

I directly used the windows user32 library in order to position the main window in C#.

[DllImport(“user32.dll”, SetLastError = true)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);

internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
internal static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
const UInt32 SWP_NOSIZE = 0x0001;
const UInt32 SWP_NOMOVE = 0x0002;
const UInt32 SWP_SHOWWINDOW = 0x0040;
// To get the main window handler

 var a1 = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap();
                        var controla = a1.GetUIController();
                        var errWindow = controla.GetMeetingUIWnd(ref handlerfirstViewZoom, ref handlersecondViewZoom);
                        if (errWindow == SDKError.SDKERR_SUCCESS)


// In this example I move the window to the desired place and force it to be top most window

 var sw = CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap();
                            var status = sw.GetMeetingStatus();
                            if (status == MeetingStatus.MEETING_STATUS_INMEETING)

                                MoveWindow((IntPtr)(((HWNDDotNet)handlerfirstViewZoom).value), dimensionPanel.X, dimensionPanel.Y + 30, dimensionPanel.W, dimensionPanel.H + 200, true);
                                // Call this way:
                                SetWindowPos((IntPtr)(((HWNDDotNet)handlerfirstViewZoom).value), HWND_TOPMOST, dimensionPanel.X, dimensionPanel.Y + 30, dimensionPanel.W, dimensionPanel.H + 200, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
1 Like