Code covered by the BSD License  

Highlights from
closewindow

4.5

4.5 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 1.48 KB File ID: #3588

closewindow

by Matthew Simoneau

 

11 Jun 2003 (Updated 04 Jan 2010)

Close any window by name.

| Watch this File

File Information
Description

Requires generic DLL calling, available as a free download here: http://www.mathworks.com/support/solutions/data/33513.shtml

Only works on Microsoft® Windows®.

 CLOSEWINDOW Close a window.
    CLOSEWINDOW(NAME) closese the window with a certain NAME.

Example:

>> system('notepad &');

>> closewindow('Untitled - Notepad')

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
ShowWindow

MATLAB release MATLAB 6.5 (R13)
Other requirements Requires generic DLL calling, available as a free download here: http://www.mathworks.com/support/solutions/data/33513.shtml Only works on Windows.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
14 Jul 2006 tronghung vo

ok

14 Dec 2006 tbzz tbzz  
16 Mar 2009 Imran

Hi Mat
I am using this function but I get this error:
??? Error using ==> calllib
To call a function both the library name and function name are needed.

Error in ==> loadlibrary at 172
    calllib(library,fcns,classname,structs,enums);

Error in ==> closewindow at 13
    loadlibrary('user32.dll',@userproto,'alias',mfilename);

whats going wrong?, I also installed DLL library from:
http://www.mathworks.com/support/solutions/files/s33513/GenericDll_1p1.exe

I would appreciate your help.
thanks
Imran

27 Feb 2010 pieter

Hello who ever can/wants to help me,
Is it possible to use the CLOSEWINDOW(NAME) in matlab 7.7.0.?
I'm allready trying to make it work for a couple of hours but I get
the error message:

Warning: A loader file was suppied that was built with a previous
version of MATLAB that will not be supported in future versions of
MATLAB.

In loadlibrary at 419
In closewindow at 13

is it possible to fix this in matlab 7.7.0.?
(I didn't download the dll calling because it is for matlab 6.5.

thank you very much

Please login to add a comment or rating.
Updates
04 Jan 2010

Add trademarks.

Tag Activity for this File
Tag Applied By Date/Time
gui tools Matthew Simoneau 22 Oct 2008 07:03:00
example Matthew Simoneau 22 Oct 2008 07:03:00
close Matthew Simoneau 22 Oct 2008 07:03:00
window Matthew Simoneau 22 Oct 2008 07:03:00
generic Matthew Simoneau 22 Oct 2008 07:03:00
dll Matthew Simoneau 22 Oct 2008 07:03:00
calling Matthew Simoneau 22 Oct 2008 07:03:00
gui Matthew Simoneau 22 Oct 2008 07:03:00

Contact us at files@mathworks.com