How to put an app in foreground from background

조회 수: 13 (최근 30일)
endystrike
endystrike 2020년 9월 3일
댓글: Nikita Agrawal 2020년 9월 3일
Hi everyone,
until MatLab 2019a I used to put this code into the script of AppDesigner to put from background to foreground an app, but unfortunately in 2020a it doesn't work anymore...
% Toggles figure visible. These two lines of code work-around an issue whether the figure is sent to the background.
app.MainApp.Visible = 'off';
app.MainApp.Visible = 'on';
Has someone found a solution to do the same in 2020a version?
Thanks a lot!

채택된 답변

Nikita Agrawal
Nikita Agrawal 2020년 9월 3일
You could use :
...
filename = uigetfile(...);
app.UIFigure.Visible = 'on';
..
Hope this helps!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by