필터 지우기
필터 지우기

how to catch when a figure was minimized

조회 수: 21 (최근 30일)
Jan Keij
Jan Keij 2019년 9월 12일
댓글: Jan Keij 2019년 9월 13일
I am writing a to-be standalone for semi-commercial use on a dedicated laptop and want to pervent the user to get to the desktop and into the PC from there. My problem is that I cannot seem to pervent the user from minimizing the main GUI figure. I can block resizing, and I can catch&prevent an effort to close the figure via 'CloseRequestFcn', but I cannot find a trick to catch minimizing. 'SizeChangedFcn' works after the fact only. If there is a way that I could constantly pole for the minimized state and restore it that would be an acceptable workaround.
Yes, I did find Jan Simon's WindowAPI to supersize the figure, but that seems require compilation of C code and I have not done that before Am hoping for alternatives.
Thanks

채택된 답변

Steven Lord
Steven Lord 2019년 9월 12일
Make the figure window 'fullscreen'?
f = figure('WindowState', 'fullscreen');
  댓글 수: 3
Steven Lord
Steven Lord 2019년 9월 12일
It didn't when I tried it on my Windows machine running release R2019a. I have not tried using a different OS or a different release.
Jan Keij
Jan Keij 2019년 9월 13일
Yes! Thank you Steve & Walter. "Fullscreen" did the trick for R2019a.
When I execute: h= uifigure(1); h.Menubar= 'none'; h.ToolBar = 'none'; h.windowState= 'fullscreen', the 3 icons are no longer visible. I tried 'mousing' against the upper boundary and I could not get to the minimimize icon. So far, so good
However.... When I excute the command sequence above, I get a 'message' at the top of the screen "Press ESC to exit full-screen mode".
This solution does move the needle, but this solution does not seem bullet-proof. CTRL + F11 or pressing 'ESC' anywhere in my program will still allow the user to minimize, even with h.Resize= 'off'.
Gents - any further suggestions?
Steve - why does MW not consider 'minimize' a resize action? Can I override the 'ESC'?
Many Thanks,
Jan

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by