how to set the frame of app designer

9 views (last 30 days)
when i run a APP, i want to set the app in front of screen. which parameter of APP can be changed to achieve my requirement?
  2 Comments
Nicolas B.
Nicolas B. on 29 Oct 2019
What do you mean by "in front of screen"? Do you mean that you want to force the app to be in fullscreen mode?
In that case, there is already a thread for it.
xianhui zhang
xianhui zhang on 29 Oct 2019
I mean let the APP always present in the first place of all running SW interfaces. In other words, let the APP run on the top layer.

Sign in to comment.

Accepted Answer

Subhadeep Koley
Subhadeep Koley on 1 Nov 2019
For MATLAB R2018a and later versions you can use the figure command to focus your app on top of all windows.
Use the code below to achieve what you want.
Go to "UIFigure > callbacks > startupFcn callback" and paste the following code
drawnow; % Put all your startup code before this line
figure(app.UIFigure);
app.UIFigure.WindowState = 'maximized'; % If your window to be maximized
Hope this helps!
  2 Comments
xianhui zhang
xianhui zhang on 1 Nov 2019
Thanks for your suggestion. But this code will let the APP be in max windowstate. I want APP running on normal window but in thr first layer.
Subhadeep Koley
Subhadeep Koley on 1 Nov 2019
Then just delete this line
app.UIFigure.WindowState = 'maximized';
In this way you can run your app in normal window and in the top layer.

Sign in to comment.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!