Close message box if user doesn't
显示 更早的评论
I am trying to use a message box to let a user know that the program is running (this program will be deployed as a standalone executable) and I want to make sure if they click ok on the message box, it doesn't break things. Here is what I was trying:
handle = msgbox('Please wait...');
%Do stuff
if exist('handle', 'var')
delete(handle);
clear('handle');
end
The problem is, while I'm "%doing stuff", the msgbox won't go away while clicking ok but when the stuff is done, it does and it still enters the if loop and tries to delete 'handle' which isn't open any more but is still a listed variable.
Recommendations?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!