Posted by Zog in SWF Studio V3 on Oct 02 2008, 05:07 am

Is it possible to disable maximize button in windows title bar?
I don't want to hide all windows title bar in SWF Studio and make my own buttons but to use original title bar with maximize button disabled or hidden.

Thanks in advance

Posted by mbd in SWF Studio V3 on Oct 02 2008, 09:35 am

ssCore.Win.showButtons({maximize:false, minimize:true, close:true});

If the minimize button is still enabled the maximize button will just be grayed out instead of hidden (Windows behavior).
If you disable both minimize and maximize they will both be hidden.

Posted by Zog in SWF Studio V3 on Oct 02 2008, 05:38 pm

It works, but then my windows taskbar disappears!? I have XP Home Edition and bellow this function in firs frame of app I have:
Stage.align = "TL";
Stage.scaleMode = "showAll";

Maybe something is wrong with my code or with showButtons function?

Posted by northcode in SWF Studio V3 on Oct 02 2008, 09:08 pm

If you turn off the maximize button you're telling Windows that this window can't be maximized. But you've already put the window into maximized mode so it appears as full screen instead.

There is a way around this, you can disable the minimize and maximize butons AFTER you call Win.maximize. The trick is that you have to make the call to disable the buttons asynchronously. Check out the example code below.

ssDefaults.synchronousCommands = true;

Stage.align = "TL";
Stage.scaleMode = "showAll";

ssCore.Win.showButtons({maximize:false, minimize:false, close:true}, {sync:false});
The reason you have to disable the minimize button too is that if you minimize then restore the window it goes back to maximize mode, but since the buttons are gone it goes fullscreen instead. So you can't let the user minimize the window.

If you need to keep the minimize feature then you'll have to control the window size and position yourself. For that you'll need the info in ssGlobals.ssMonitorInfo. The work area is where you want your application to appear, leaving the area where the task bar appears uncovered.

Posted by Zog in SWF Studio V3 on Oct 03 2008, 08:40 am

First I want to say that I appreciate a lot that you help me although I use trial version for a long time (more than one year). I jumped from competition compiler to SWF Studio (and stay) because (among other capabilities) of its stability and I will definitely purchase it when I finished my project.

What I want is to have app maximized if the v resolution is from 768 to 1024.
In that cases(s) I don't care about maximized button in title bar because it can't deform my app if you click it to maximize.

But if the v res is bigger than 1024 I want to have centered app with disabled max. button and with the size of app the same when maximized at v res of 1024 (optimum size).

My flash (ClientSize) size is 1024x768.

So my final code would be:

function setGlobalStyles(){
var xres = System.capabilities.screenResolutionX;
var yres = System.capabilities.screenResolutionY;


if (yres >= 768 && yres <= 1024) {

else if(yres > 1024){

ssCore.Win.setSize({width:1286, height:1000});
ssCore.Win.showButtons({maximize:false, minimize:true, close:true}, {sync:false});

"ssCore.Win.setSize({width:1286, height:1000});" I got with getSize() when the app is maximized at v res of 1024 which is optimum of viewing the app.

I can't test it for big monitors because I can't find one at the moment but are these setting enough to have proper appearence and size of the app with these resolutions?

Posted by Zog in SWF Studio V3 on Oct 10 2008, 06:57 am


if(yres > 1024){
ssCore.Win.setSize({width:1280, height:994});;

This code puts the app approximately 15 pixels behind and bellow of taskbar.
Horizontal center is ok.
Screen resolution is 1680x1050.

Posted by northcode in SWF Studio V3 on Oct 10 2008, 08:50 am

This code puts the app approximately 15 pixels behind and bellow of taskbarSounds about right., centers the window on the desktop, not in the work area. If you want it centered in the work area, you have to do that yourself. Check out ssGlobals.ssMonitorInfo to find the visible work area (part of the desktop not covered by the taskbar).