Resizing a window in Windows

I have a problem with my app in Windows (works fine on Mac).

When I start up my app in Windows (XP to 10) it looks like this:

As soon as I try to resize it (bigger or smaller), it shrinks to this:

Once shrunk, I can’t drag it bigger - it just flips back to the small size.

The Windows maximise button works fine, but as soon as I click on the Windows Restore button, it reverts back to the small size again.

I do have a Resized and Resizing event handler that makes a vertical scrollbar appear/disappear on a canvas (on a different page of the page panel):

//reset the bas canvas scroll to top bascanvas.scroll (0,-scrollpixels) scrollpixels=0 oldscroll=0 basscrollbar.value=0 //and make scrollbar invisible if window big enough to show all bas sheet if me.height > 760 then basscrollBar.visible= false else basscrollbar.visible = true end if

But thats it. No other resizing events are handled.

What is making the window flip from fullscreen to tiny, and nothing in-between?

Here are my IDE settings for Window1

My min width and height are set, yet Windows resizes to much smaller.

Even if I delete my Window1 Resize and Resized event handlers, the resizing issue still occurs.

Why oh why?

What happens if you change MaxWidth and Height from 0 to 32000?

Yeah, why would you have the Max values at 0?

That’s it! I just assumed maxwidth=0 means no limit.

This just proves:

  1. Sometimes the solution is in front of your eyes
  2. A fresh set of eyes works wonders
  3. I’m stupid

thanks!