[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Flex Resizing the WindowedApplication to the Full Screen

Posted on 2011-04-19
8
Medium Priority
?
3,853 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





0
Comment
Question by:SreeramojuPradeep
  • 4
  • 4
8 Comments
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35423441
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
 

Author Comment

by:SreeramojuPradeep
ID: 35423998
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
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35424109
Right, So you want to maximize not do full screen?

Warm Regards
Deepanjan Das
0
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 

Author Comment

by:SreeramojuPradeep
ID: 35424175

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
 

Author Comment

by:SreeramojuPradeep
ID: 35424181
yes.
0
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35424217
How are you trying to minimize to 1024/600?

Warm Regards
Deepanjan Das
0
 

Author Comment

by:SreeramojuPradeep
ID: 35424312

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
 
LVL 17

Accepted Solution

by:
deepanjandas earned 500 total points
ID: 35424427
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

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question