Posted by gec in SWF Studio V3 on Jun 10 2008, 01:41 pm

Hi,

need to open my application maximized, the title bar should be visible with the buttons minimize and close. the taskbar should always be visible.

here's my code:
ssCore.Win.maximize();
ssCore.Win.showButtons({minimize:true, maximize:false, close:true});

when i click on minimize the application is minimized to the taskbar, when i click in the taskbar then the application is restored to maximize size, but the taskbar is not visible.

if i deactivate the showButtons statements, then it works, but i dont want user to use the maximize/restore button.

do i need additional settings for the desired behaviour ?
thank you in advance.
cinzia


Posted by northcode in SWF Studio V3 on Jun 10 2008, 02:12 pm

Changing the button states changes the window style that Windows uses to render your application. Turning off the maximize button may make it impossible to have the application window "maximized" normally. What you get instead is more like full screen, but with a title bar.

You can achieve the same effect, but it won't work with the min/max/restore buttons. If you handle the click on the taskbar yourself then you can set the application window size to whatever you like.

You will have to get the size and position of the work area using ssGlobals.ssMonitorInfo and then use Win.setSize and Win.setPosition to fill that space, leaving the taskbar exposed.

Whenever you want to do something that's not "standard", it's going to be more work for someone :)


Posted by gec in SWF Studio V3 on Jun 11 2008, 11:46 am

thanks for the quick answer.

by disabling the maximize button i tought to solve the problem i have with the display of an activeX, but maybe this not a good idea.

i am using the videocap mobile activeX control (viscomsoft.com) for handling videorecording, which i place on stage at a fixed position:
ssCore.VideoIn.setPosition({x:50, y:150});
ssCore.VideoIn.setSize({width:640, height:480});
ssCore.VideoIn.setVisible( { visible:"true" } );
(VideoIn is the name of activeX object):

however when someone maximize the application window before the webcam preview of the activeX control is displayed, the position is not correct (x:50, y:150 is not anymore relative to the upper left corner of my Flash movie ?).
i will need to check the application's window size before placing the activeX control with ssCore.Win.getClientSize. think this will be less work ..

regards
cinzia


Posted by perks in SWF Studio V3 on Jun 17 2008, 09:16 am

Hi,

I have a similar issue, however I would just like to remove the maximize button from the window leaving the minimize and close buttons.

I have found the code to do this and understand it's syntax:

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

What I cant figure out at all, is *where* to put this! This is a total noob question I know, but ive done a fair bit of searching around and cant find any noob info!

cheers in advance for any help or an explanation of how to get this code working!


Posted by mbd in SWF Studio V3 on Jun 17 2008, 10:12 am

Place the code in your FLA or AS file. You access SWF Studio commands from Flash's ActionScript.

To actually have your SWF use the SWF Studio commands you publish your SWF with the ActionScript changes and then build an EXE using SWF Studio. Then when the EXE runs your ActionScript can access the SWF Studio commands and objects.

Does that help?

Btw, the minimize and maximize buttons are a pair and can't be hidden separately. You won't be able to make the maximize button disappear, unless you also disable the minimize button.


Posted by northcode in SWF Studio V3 on Jun 17 2008, 11:00 am


QUOTE:
Btw, the minimize and maximize buttons are a pair and can't be hidden separately. You won't be able to make the maximize button disappear, unless you also disable the minimize button.Just in case it wasn't entirely clear, although they can't ben hidden separately, setting maximize to false will disable the maximize button and make it appear grayed out. However, as Derek mentioned, it won't remove the button from the title bar unless you also disable the minimize button.