How to hide title and windows bars?
10 views (last 30 days)
Show older comments
Basically, I am trying to make a slideshow using Matlab.
I want to hide all bars(just normal size pictures) and around pictures should be black.
Until now;
Photos = 'C:\Users\Ata\Documents\Photos\2015-09-27';
file = fullfile(Photos, '*.jpg');
jpegFiles = dir(file);
%--------------------------------------------------
for k = 1:length(jpegFiles)
baseFileName = jpegFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
fprintf(1, '>>>>> %s\n', fullFileName);
imageArray = imread(fullFileName);
%----------------------------------------------------
set(gcf,'Toolbar','none','Menubar','none');
ScrSize = get(0,'ScreenSize');
set(gcf,'Units','pixels','Position',ScrSize);
% get the figure and axes handles
hFig = gcf;
hAx = gca;
% set the axes to full screen
set(hAx,'Unit','normalized','Position',[0 0 1 1]);
%----------------------------------------------------
% hide the toolbar
set(hFig,'menubar','none')
% to hide the title
set(hFig,'NumberTitle','off');
%backgraund colar settings
set(gcf,'color','black');
%------------------------------------------------------
%----------------------------------------------------
imshow(imageArray); % Display image.
pause(2);
drawnow; % Force display to update immediately.
end
1 Comment
Adam
on 26 Oct 2016
I don't think you can remove the bar at the top (whatever it is called) without resorting to some underlying java programming. I guess it is considered desirable for Mathworks to always have their logo on figures since they are produced within Matlab.
Answers (1)
Jan
on 26 Oct 2016
You can remove all decorations using https://www.mathworks.com/matlabcentral/fileexchange/31437-windowapi under Windows. I will post a new version compatible with the modern HG2 graphics today.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!