声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2779|回复: 5

[综合讨论] 怎么去掉运行.exe文件后所出现的黑框??

[复制链接]
发表于 2007-6-21 21:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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

[ 本帖最后由 eight 于 2007-6-21 22:29 编辑 ]
回复
分享到:

使用道具 举报

发表于 2007-6-21 22:30 | 显示全部楼层


上 simwe 论坛找找吧,依稀记得那里有过类似的讨论
 楼主| 发表于 2007-6-21 22:51 | 显示全部楼层
谢谢,我去查查看
 楼主| 发表于 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.
发表于 2007-6-23 22:02 | 显示全部楼层
发表于 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

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-6-28 01:45 , Processed in 0.053220 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表