We help IT Professionals succeed at work.

Flex Resizing the WindowedApplication to the Full Screen

SreeramojuPradeep
on
4,059 Views
Last Modified: 2012-05-11
Hi,

In WindowedApplication, I have called the applicationComplete to make my desktop application to go Full Screen.
The Application is maximizing to the FullScreen from minWidth and minHeight. Initially,I have hard
coded minWith and minHeight
It first loads the native window's minWidth and minlHeight and then it traverses to Full Screen... Smooth resizing of the application is not happening.

 
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
					   minWidth="1024" minHeight="600" backgroundColor="#000000"
					   applicationComplete="goFullScreen()" showStatusBar="false"
					   >
	<fx:Script>
		<![CDATA[
			private function goFullScreen():void{
				
				this.stage.nativeWindow.addEventListener(NativeWindowBoundsEvent.RESIZE,resize);
				this.stage.nativeWindow.maximize();
				
				nativeWindow.x = (Capabilities.screenResolutionX - nativeWindow.width) / 2;
				nativeWindow.y = (Capabilities.screenResolutionY - nativeWindow.height) / 2;
			}
			
			private function resize(event:NativeWindowBoundsEvent):void{
				this.stage.nativeWindow.activate();
			}
			
		]]>
	</fx:Script>
	
</s:WindowedApplication>

Open in new window


Can any one let me know how to solve this issue.

Thanks
Pradeep





Comment
Watch Question

I have used this for maximizing the screen and the experience was somewhat smooth. Give it a try:

The library is at http://code.google.com/p/airscreenmanageras3/source/browse/trunk/be/boulevart/air/utils/ScreenManager.as?spec=svn3&r=3

Code I used is:

ScreenManager.openWindowFullScreenOn( this.stage.nativeWindow, 1, StageDisplayState.FULL_SCREEN_INTERACTIVE );
                        
Warm Regards
Deepanjan Das

Author

Commented:
Hi,

   I have used ur code in my application.....
Here I used  this ScreenManager (ie.,-- ScreenManager.openWindowFullScreenOn( this.stage.nativeWindow, 1, StageDisplayState.FULL_SCREEN_INTERACTIVE );  ) in applicationComplete even though its showing multiple windows initially and its moving to maximum size.......

Also, If I use FULL_SCREEN_INTERACTIVE --  max, min and close buttons of the main Application are going invisible.........

Thanks
SreeramojuPradeep
Right, So you want to maximize not do full screen?

Warm Regards
Deepanjan Das

Author

Commented:

Hi,

I again used  --  ScreenManager.stretchWindowToAllScreens(this.stage.nativeWindow); in applicationComplete,  its working fine initially.....
 but the problem is once it initially maximised to full screen if I want to min to 1024/600 its not minimising ...

after compressing manually its resizing next onwards.....

Author

Commented:
yes.
How are you trying to minimize to 1024/600?

Warm Regards
Deepanjan Das

Author

Commented:

In WIndowedApplication, am using minHeight and minWidth to 600 and 1024.... so that if I Click on the native window it should have to minimize or maximize.

Thanks & Regards
Pradeep
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.