Flex Resizing the WindowedApplication to the Full Screen

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





SreeramojuPradeepAsked:
Who is Participating?
 
deepanjandasConnect With a Mentor Commented:
so do not use fullscreen. rather use maximize so that you can view the title bar with the maximize and restore options.

Now in AIR there are events to track the click, so on restore event, set the window sire to its min width and height.

Makes sense?

Warm Regards
Deepanjan Das
0
 
deepanjandasCommented:
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
0
 
SreeramojuPradeepAuthor 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
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
deepanjandasCommented:
Right, So you want to maximize not do full screen?

Warm Regards
Deepanjan Das
0
 
SreeramojuPradeepAuthor 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.....
0
 
SreeramojuPradeepAuthor Commented:
yes.
0
 
deepanjandasCommented:
How are you trying to minimize to 1024/600?

Warm Regards
Deepanjan Das
0
 
SreeramojuPradeepAuthor 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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.