LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

怎样隐藏MATLAB工作窗口

I want to hide the conmmand window of the MATLAB after I have started it .
Could I carry it out with the 'ShowWindow' command in Windows SDK ?
I have viewed the help information of the function ,but I still don't know how to fill paraments in it .

or should I use other function to complish my work ?

I also wandered what should I pay attention to when I am using the Windows SDK in CVI.
Could you give me a hand about the problem ?
Thanks for your help !
0 Kudos
Message 1 of 5
(4,370 Views)
Hello linfeng413,

Instead of dealing with the Windows SDK to hide the Matlab command window, I would suggest using the ActiveX functions exposed by Matlab. If you have the Matlab instrument driver in your CVI workspace, I would using the MLApp_DIMLAppMinimizeCommandWindow function to minimize the Matlab command window.

As a reference point, look at the ActiveX Matlab shipping example located in \samples\activex\matlabdemo.prj. I would take a look at the launchCB callback function. At the end of that function, the MinMaxMatlab() helper function is called. If you look at this function in the matlabUtil.c file, you will notice that we use the Matlab function suggested above to minimize the command window. I would suggest studying this shipping example to learn how to best use the provided Matlab ActiveX functions.

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 5
(4,356 Views)
Thanks for your help!
I don't want to minimize the command window.I want to hide it.
0 Kudos
Message 3 of 5
(4,342 Views)
Hello linfeng413,

Well, the best resource and examples of how to use the Windows SDK can be found on Microsoft's website. In particular, you can find more information on the ShowWindow function on the following MSDN page. I would suspect that you will need to iterate through the open application windows, find the Matlab window, get the handle for this window, then call the ShowWindow function with the SW_HIDE parameter.

Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 5
(4,338 Views)
Thank you !
I will have a try .
0 Kudos
Message 5 of 5
(4,325 Views)