centring a patcher window in a standalone app

oli larkin's icon
Max Patch
Copy patch and select New From Clipboard in Max.

i do this to centre a patcher window on a screen:

but in a standalone to be distributed, it results in an ungraceful window flicker when you load the app on a different res screen to what the patch was saved on.

does anyone have a solution for this problem?

thanks,

oli

Dan Nigrin's icon

Haven't tried this Oli, but could you save the patch with off-screen coordinates, or 1 pixel large window size, and *then* do your window resizing/positioning? Just an idea, not sure if it would work.

oli larkin's icon

I tried that, but offscreen coords don't seem to work in standalones

oli larkin's icon

Maybe I will give up centering and just use a fixed offset from top right hand corner

Dan Nigrin's icon

How about the 1 pixel wide initial screen, instead of off-screen?

oli larkin's icon

yes it worked! thank you very much!

Dan Nigrin's icon

Glad to hear it! I'll probably use the same trick myself one day... ;-)

Josep Garces's icon

I made a patch that resize and zoom the windows. When It does calculate the zoom factor and the windows size. Resize and zoom works well, but the inside of the windows gets off position.

I'm using "windows size f f f f, window exec" and "zoomfactor f" messages to [thispatcher]

How can I fix this?

More suggestion for resizing windows?