How to automatically display a figure in fullscreen in MATLAB2016?

49 views (last 30 days)
Hi,
I would like to display automatically a figure in fullscreen (without the windows system bar). I found a way in matlab 2019 that works :
RGB = imread('peppers.png');
I = rgb2gray(RGB);
proj1 = figure('NumberTitle', 'off','Name', 'proj1');
set(proj1,'units','normalized','outerposition',[0 0 1 1]);
imshow(I);
% Reglage fenetre plein ecran
% get the figure and axes handles
proj1 = gcf;
hAx1 = gca;
% set the axes to full screen
set(hAx1,'Unit','normalized','Position',[0 0 1 1]);
% hide the toolbar
set(proj1,'MenuBar','none');
% to hide the title
set(proj1,'NumberTitle','off');
set(proj1,'WindowState', 'fullscreen');
set(hAx1,'DataAspectRatioMode','auto');
set(hAx1,'Position',[0 0 1 1]);
But when I try it in matlab 2016b it does not work because the WindowState property doesn't exist. Do you know a workaround to get the image in fullscreen without the windows system bar? I tried CTRL+F11 to get it in fullscreen but the command doesn't work.
Thanks

Accepted Answer

Rik
Rik on 27 May 2020
It doesn't look it is possible to draw over the taskbar like that in older versions. The closest you will probably get is with something like this.
f=figure(1);
set(f,'Position',get(0,'screensize'))

More Answers (0)

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!