📄 scriptform.m
字号:
function scriptform(vb, fid)
% Creates a figure window for each form in a Visual Basic Project.
% Size is the same as in VB and sizes are referenced to top left corner.
% Resize is relative to top right corner by use of RESIZEFCN "script_resize(gcf)"
% Martin Dale, July 2002
% Copyright 2002 All Rights Reserved.
% Version 1.00 9 June 2002
% Contact Martin.Dale@Physics.org
forms=fieldnames(vb.form);
for i=1:length(forms)
thisform=eval(['vb.form.',char(forms(i))]);
str=['pos=[',num2str(thisform.clientleft+120),', screen(4)-',num2str(thisform.clienttop),'-',num2str(thisform.clientheight),'-300, ',num2str(thisform.clientwidth),',',num2str(thisform.clientheight),']/20;'];
fprintf(fid,['\n',str,'\n']);
str=['control_info.handle=''',thisform.handle,''';'];
fprintf(fid,[str,'\n']);
str=['control_info.virtualparent=''0'';'];
fprintf(fid,[str,'\n']);
str=[thisform.handle,'=figure(''NumberTitle'',''off'',''Menubar'',''none'',''Name'',''',thisform.caption,''',''Units'',''points'',''Position'',pos,''userdata'',control_info);'];
fprintf(fid,[str,'\n']);
str2=['handlelist.',thisform.handle,'=',thisform.handle,';'];
fprintf(fid,[str2,'\n']);
str=['set(',thisform.handle,',''resizefcn'',''script_resize(gcf)'');'];
fprintf(fid,[str,'\n']);
str=['clear control_info;'];
fprintf(fid, [str,'\n']);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -