Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

guide: how to open a full-screen window?

155 views
Skip to first unread message

Stéphane

unread,
Oct 1, 2010, 5:08:21 PM10/1/10
to
Hello,

everything is in the title: if one would like to open his/her program window in full-screen, how would he/she do?

Thank you!!

ImageAnalyst

unread,
Oct 1, 2010, 5:16:21 PM10/1/10
to
---------------------------------------------------------------------------------
Go here to get maxfig:
http://www.mathworks.com/support/solutions/en/data/1-3MY8PN/?solution=1-3MY8PN

% Call special function that The Mathworks gave me to maximize the
window and leave it in focus.
% minfig(F,1) % minimizes the figure window for the figure
with handle F
% minfig(F,0) % restores figure F if F is minimized
% maxfig(F,1) % maximizes the figure window for the figure
with handle F
% maxfig(F,0) % restores figure F if F is maximized s =
figstate(F) % returns the state of figure { Maximized | Minimized |
Normal }
% Note: This works only if the window is already displayed. If
not, it will throw a java exception.
if exist('axesChildHandle', 'var')
maxfig(handles.figMainWindow, 1) % Maximizes the figure window
for the figure with handle in the first argument.
end

Put it in the OutputFcn() function of your GUI.

Jan Simon

unread,
Oct 1, 2010, 5:51:19 PM10/1/10
to
Dear Stéphane,

what exactly is "full screen"?
- The outer position with window border fills the screen.
- The inner position fills the screen, so the window border is invisbile, but the taskbar is still visible.
- Even the taskbar is invisible and the AXES([0, 0, 1, 1]) object fill the complete screen.

There are some problems using standard Matlab methods:
pos = get(0, 'ScreenSize');
figure('position', pos); % ?? Border is still visible?!
figure('outerposition', pos); % Taskbar is visible
But there are some submissions in the FEX, which solve these two jobs. For the third problem, I found a solution only for Windows:
Create a MEX which set the window positions to the desired size, and set the SWP_NOSENDCHANGING flag in SetWindowPos.

Good night, Jan

Stéphane

unread,
Oct 5, 2010, 1:51:21 PM10/5/10
to
"Jan Simon" <matlab.T...@nMINUSsimon.de> wrote in message <i85l4n$a19$1...@fred.mathworks.com>...
> Hello,

by full-screen, I mean that as soon as the user click on the open button, the popup must be as large as possible (but keeping the scroll bar etc.)

I have to admit that I am pretty new to Matlab, I only used Simulink in the past and this is my first gui project.

Thank you,

Stephane

0 new messages