Position and Resize the main window. Standard UI

Description

I am using the UI Standard.
I want to control the size and position of the main window.

At the moment I can only control the initial position of the window (left and top).
I have not been able to control the width and height of the window.
Is this possible to do?

Which version?
Windows SDK: v5.0.24433.0616

I’m using C# wrapper last version

var a1 = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap();

        var x1 = System.Windows.SystemParameters.PrimaryScreenWidth - 255; // width
        var y1 = System.Windows.SystemParameters.FullPrimaryScreenHeight - 20; // height
        var c = a1.GetMeetingConfiguration();
    
        WndPosition wp = new WndPosition();
        wp.left = (int)x1;
        wp.top = 0;
      
        c.SetMeetingUIPos(wp);

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);

    [DllImport("user32.dll")]
    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;

public ValueType handlerfirstViewZoom = new HWNDDotNet();
public ValueType handlersecondViewZoom = new HWNDDotNet();

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)
{

}

// To position the main window side by side with my form.
// Do it in the Move and ResizeEnd events of the form.

if (((HWNDDotNet)handlerfirstViewZoom).value != 0)
{
MoveWindow((IntPtr)(((HWNDDotNet)handlerfirstViewZoom).value), 0, this.Top, this.Left + 9, this.Height, true);
}

//

1 Like

Hey @ajc0006 !!

Your code helped me to embed zoom into my C# app. Thanks for that!

But Im facing a bug when the user double clicks the zoom window:

Have you been facing that bug? If you did, can you share your solution?
Thanks a lot!!

Hey @fpujol,

Please see my comment on that post. Thanks! :slight_smile:

Michael

Done!
Thanks to you!

Fernando

@fpujol,

Awesome, will follow up with you there.

Thanks!
Michael