Window resize in Windows

On Mac, if I set Resize on a window to Yes… I can drag the lower right corner and resize the window manually.

On Windows though with same property set on the window, there is no drag area visible and if I just try to slecte and drag the corner nothing happens.

I know I can resize windows on Windows… so not sure why this is not working for my application.

What is the window style?
Movable modal?

I think it’s not a question of ‘set to allow resize’ so much as ‘untick to prevent resize’

For some reason it is set to Metal Window.

I am still on old 2014 r2.1 due to 2 controls that are not compatible on higher versions of Xojo. I am removing them in the next month but until then… mine says Resizeable and lets me select Yes or No. When I changed it from No to Yes… Mac allows the resize on the window. But Windows seems to let me select the corner but when I drag nothing happens… it doesn’t change size.

If you get the double-ended arrow cursor when you position the mouse on the edge of the window, the system is seeing it as resizable. The next thing I’d check is the window, minimum and maximum width and height. If those are set to the same value as the Width and Height, the window can’t be resized. (Yes, I actually did that by accident and puzzled about it for a few hours. I felt really dumb when I noticed it.)

1 Like

The Maximum values are set to 32000. Very high compared to current values of 826 and 636,
Still can’t resize it in Windows. Nothing happens.

A couple of things to test and answer :slight_smile:

  1. Can you move the window using the mouse on the title bar?
  2. Do you have any code in there to maximise it and then set its dimensions?
  3. Do you see this icon when you move the mouse near the right edge of the window
  4. Can you upload a screenshot of the window so I can see what “state” its in?
  5. If you click on the icon in the top left corner of the window do you see a dropdown menu like this
  6. If so, are the entries in the same “greyed” state as the picture shown above (i.e. just Restore is greyed)?
  7. If Size is clickable, click and then press right arrow on the keyboard, now move the mouse, does it resize then?
1 Like


OK I forgot I am using ElasticWindow as its super. I’m guessing that it is something with that. I set that up years ago and forgot about it.


Yes. See screenshot above.

[quote=372411:@]If so, are the entries in the same “greyed” state as the picture shown above (i.e. just Restore is greyed)?

It looks like the window starts to get bigger to the right, then a flash and it returns to regular size and the stretch size arrows disappear.

Everything seems find with your answers, there shouldn’t be a problem resizing the window (i.e. its not in a silly state)

Yeah, that will be a bit of code that’s doing that, probably in “ElasticWindow”, whatever that is :slight_smile:

Like an if window.width > x then window.width = x kind of thing, same for height, probably in the Resizing event.

It might even happen in a wndproc if its only happening on Windows.


Or window.minwidth and window.maxwidth might be being set at runtime.

Try system.debuglogging their values at runtime.

I logged the window max and min width in resized… and it stays at 32000 the entire time the app is running.

has anyone used Maybe I will try that instead of elasticwindow.

I worked intensely on RubberViews to overcome the limitations of Windows. In particular, on small screens, it is impossible to create larger windows than the screen, unlike what happens with Mac.

Both min and max are at 32000? That’s not good or was that a typo?

No not a typo. It was the default when I created the window years ago. I never set that value.

I found the issue in the Elastic Window documentation. See Number 2 below.
When I went into My windows advanced system props and turned OFF “Show window contents while dragging” then I could all of a sudden resize the window. Obviously this is a problem since such a setting change being required just to resize is not good.

Soooo… I changed my resizemode to None and then re-enabled the windows setting… the window DOES resize now but it’s a bit ugly during resize as some controls are half drawn and some flickering occurs.

Michel, I can switch to RubberViews if you think it would help. Does Rubberviews have any issue with control drawing during resize?


---- Text below from Elastic Windows Documentation —

ResizeMode(ElasticWindowResizeMode) – Change the resizing method that
Elastic Window uses. There are three methods one may use:

  1. ElasticWindowResizeMode.Control – This is the default method
    Elastic Window uses. Before resizing a control, it is made invisible in order to
    speed up resizing, but may cause a flicker on some platforms.
  2. ElasticWindowResizeMode.Window – This method will hide the
    entire window prior to resizing. The “LiveResize” window property should
    be turned off. To use this option successfully on Windows clients, “Show
    window contents while dragging” must be turned off. On Windows XP, this
    can be done by right-clicking on the desktop and choosing Properties, select
    the Appearance tab and click the Effects button. Once in the Effects window,
    uncheck “Show window contents while dragging”.
  3. ElasticWindowResizeMode.None – This method hides neither the
    controls nor the window prior to resizing, and may be faster on newer

Sorry to clarify the 32000 was me.Window.MaxWidth not Width and MaxHeight not Height.

+1 for RubberViews

Pretty sure you can try it before you buy it.

The entire issue was caused by ElasticWindow. I’ve used it for a long time and just now had a client mention he couldn’t resize the window on Windows.

I have installed the demo for RubberViews anyway just to see if that was better but I had some issues that are no fault of RubberViews. I will try that again later when I have gotten rid of 2 old controls and climbed the Xojo version ladder from where I am in the dark ages of 2014.

Thanks for all the ideas.

Glad you got to the bottom of it Tim