maximize figure windows

版本 1.0.0.0 (4.2 KB) 作者: Alain Trostel
Maximize figure windows by using the Microsoft Windows application programming interface (API).
15.5K 次下载
更新时间 2007/6/5

无许可证

Unzip the files and change the the "Current Directory" in MATLAB. Afterwards you can use the function "maximize.m". This function does the same as pressing the "maximize" button on the top right of the window. When you press the "maximize" button after using this function, the figure window will restore to its previous size.
The function is specific to Mircosoft Windows.

Examples:

maximize the current figure
----------------------------
maximize;

maximize the current figure
----------------------------
maximize(gcf);

maximize the specified figure
------------------------------
h = figure;
maximize(h);

maximize the application window
--------------------------------
maximize(0);

maximize more than one figure
------------------------------
h(1) = figure;
h(2) = figure;
maximize(h);

maximize all figures
---------------------
maximize('all');

maximize a GUI in the OpeningFcn
---------------------------------

% --- Executes just before untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to untitled (see VARARGIN)

% Choose default command line output for untitled
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes untitled wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% maximize the GUI
set(hObject,'Visible','on');
maximize(hObject);

引用格式

Alain Trostel (2024). maximize figure windows (https://www.mathworks.com/matlabcentral/fileexchange/10274-maximize-figure-windows), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

new example (OpeningFcn, GUI)