coolhpas 发表于 2007-6-21 21:52

怎么去掉运行.exe文件后所出现的黑框??

将程序编译成可执行文件后,再执行,会弹出一个类似于command的黑框,怎么去掉这个东西?

[ 本帖最后由 eight 于 2007-6-21 22:29 编辑 ]

eight 发表于 2007-6-21 22:30

原帖由 coolhpas 于 2007-6-21 21:52 发表 http://www.chinavib.com/forum/images/common/back.gif
将程序编译成可执行文件后,再执行,会弹出一个类似于command的黑框,怎么去掉这个东西?

上 simwe 论坛找找吧,依稀记得那里有过类似的讨论

coolhpas 发表于 2007-6-21 22:51

谢谢,我去查查看

coolhpas 发表于 2007-6-21 23:00

不过,百度一下,又搜到本版有些信息

是网友adminftp 回复:(wenbinnuaa)时提供的一个方法,不过实现好像有些难度 。。。

转一下这个方法

有关去掉matlab编译黑屏的方法

至于黑屏,这里有个解决的办法,借助于三方

http://newsreader.mathworks.com/WebX?50@55.5BdEa0Xui5I.0@.eeba9ab


MATLAB Central > comp.soft-sys.matlab > archive > A Windows version-independent way to suppress command window for standalones



Subject: A Windows version-independent way to suppress command window for standalones


E-mail me when replies are made to this thread
Message 1 in thread
From: Nathan Childress
(sauroneru@hotmail.com)
E-mail me when this author posts
Date: 2003-03-11 11:57:11

1. Compile your GUI into an exe. We'll call it "foo.exe".
2. Download and install NSIS - the installation program created and
used by the fine folks at Nullsoft (think Winamp):

http://www.nullsoft.com/free/nsis/

3. Make an NSIS script text file in the same directory as your exe,
let's call it "file.nsi". Put the following text in there:

SilentInstall silent

; The name of the NSIS install program you're creating
Name "NotSeen"

; The file that NSIS writes
OutFile "nocmdwindow.exe"

Section "Ignore"
; Change this exe file to the name of the exe you created
nsExec::Exec "cmd /C foo.exe"
SectionEnd

4. Save the file and compile it into the new exe ("nocmdwindow.exe")
by right clicking on it and selecting Compile. Or you can open the
"Make NSIS GUI" window and select "Load Script..." from the File menu.

5. Now run "nocmdwindow.exe". As promised, no command window. And
so simple to implement. Plus, if you ever want to see the command
window for diagnostic purposes, you can always run the original exe
file ("foo.exe"), and it will run normally with its glorious DOS
window.

You also have a really easy to use and powerful Windows installer
program that's free. The no command window trick works with NSIS by
calling a dll (nsExec.dll) and running the program through it,
suppressing all text output, but leaving popup windows alone.

happy 发表于 2007-6-23 22:02

http://forum.vibunion.com/forum/viewthread.php?tid=5382

这个问题讨论了快两年了

shunfly 发表于 2007-6-24 16:31

我记得应该taohe的深入浅出MATLAB7.X混合编程书上提到了5种方法
你可以翻翻仿真论坛MATLAB版的精华帖
我个人认为最方便的还是codeguru.提供的这个小软件
相关帖子
http://www.simwe.com/forum/viewthread.php?tid=195309
http://www.simwe.com/forum/viewthread.php?tid=191738
页: [1]
查看完整版本: 怎么去掉运行.exe文件后所出现的黑框??