# How to Maximize Window Across All Monitors

**URL:** <https://clarionhub.com/t/how-to-maximize-window-across-all-monitors/6627>\
**Category:** questions\
**Tags:** windows, winapi\
**Created:** [September 27, 2023, 1:54pm UTC](https://clarionhub.com/t/how-to-maximize-window-across-all-monitors/6627 "2023-09-27T13:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![donridley](https://clarionhub.com/user_avatar/clarionhub.com/donridley/32/1459_2.png) [@donridley](https://clarionhub.com/u/donridley)\
**Post date:** [September 27, 2023, 1:54pm UTC](https://clarionhub.com/t/how-to-maximize-window-across-all-monitors/6627/1 "2023-09-27T13:54:45Z")

</div>

Hello All,

How do I maximize a window across all monitors?

Apparently this:

> **[WM\_GETMINMAXINFO message (Winuser.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-getminmaxinfo)**
>
> Sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.

and this:

> **[MINMAXINFO (winuser.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-minmaxinfo)**
>
> Contains information about a window's maximized size and position and its minimum and maximum tracking size.

are involved.

Using WinEvent, I am able to capture the WM\_GETMINMAXINFO and I tried this:

```auto
    Case WinEvent()
    Of WM_GETMINMAXINFO
    
        st.SetValueByAddress(WinParam2(),Size(MaxInfoGrp))
    
        MaxInfoGrp.ptMaxPosition.x = CLRGetSystemMetrics(CLR:SM_XVIRTUALSCREEN)
        MaxInfoGrp.ptMaxPosition.y = CLRGetSystemMetrics(CLR:SM_YVIRTUALSCREEN)
        MaxInfoGrp.ptMaxSize.x = CLRGetSystemMetrics(CLR:SM_CXVIRTUALSCREEN)
        MaxInfoGrp.ptMaxSize.y = CLRGetSystemMetrics(CLR:SM_CYVIRTUALSCREEN)
        !0{PROP:Xpos} = MaxInfoGrp.ptMaxPosition.x
        !0{PROP:Ypos} = MaxInfoGrp.ptMaxPosition.y
        !0{PROP:Width} = MaxInfoGrp.ptMaxSize.x
        !0{PROP:Height} = MaxInfoGrp.ptMaxSize.y
        MyColor.Trace('TransparentWindow - WinEvent - WM_GETMINMAXINFO ' & MaxInfoGrp.ptMaxSize.x & ' ' & MaxInfoGrp.ptMaxSize.y)
            0{PROP:Xpos} = CLRGetSystemMetrics(CLR:SM_XVIRTUALSCREEN)
            0{PROP:Ypos} = CLRGetSystemMetrics(CLR:SM_YVIRTUALSCREEN)
            0{PROP:Width} = CLRGetSystemMetrics(CLR:SM_CXVIRTUALSCREEN)
            0{PROP:Height} = CLRGetSystemMetrics(CLR:SM_CYVIRTUALSCREEN)
   End

```

But this does not work. The GetSystemMetrics call works as expected but the window doesn't maximize like I want.

Anyone attempted this or have any ideas?

Thanks!

Don

---

<div class="post-metadata">

**Author:** ![noyantis](https://clarionhub.com/user_avatar/clarionhub.com/noyantis/32/922_2.png) [@noyantis](https://clarionhub.com/u/noyantis)\
**Post date:** [September 27, 2023, 2:14pm UTC](https://clarionhub.com/t/how-to-maximize-window-across-all-monitors/6627/2 "2023-09-27T14:14:38Z")

</div>

Hi Don,

We allow for this in our G-Visuals product.

Without our product, you’d be looking to query the available monitors, then have a Non MDI window size itself to the left most monitor, with a width that covers all available monitors widths (presuming you query / sort them devices left to right).

Download our demo app ([https://noyantis.com/product/g-visuals/](https://noyantis.com/product/g-visuals/) on the Additional Info tab) - then try out the Child Windows procedure

It will at least give you an idea of how to test it 🙂

Failing that, you could of course just buy G-Visuals and have it do all the work for you 🙂

Regards,

Andy  
[noyantks.com](http://noyantks.com)
