ANSI清晰屏幕[MS& Borland公司] [英] ANSI clear screen [MS & Borland]

查看:80
本文介绍了ANSI清晰屏幕[MS& Borland公司]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试清除程序中的屏幕。

我喜欢在所有编译器上运行的东西,尤其是

Borland& MS Visual Studio 6.

在Visual Studio中,我使用了''system(" cls");''这样可以正常工作但这个

不会工作Borland。

在Borland我使用了''clrscr()''函数,它运行正常,但不适用于

Visual Studio。


有没有什么可以清除两者的屏幕,也许

在gcc上工作?

在Borland我想用''easywin.exe'代替控制台窗口

并清除屏幕。


我认为''system(" cls");''可以用这个吗? br />

有什么想法吗?


提前致谢,

Ritchie

解决方案

搜索Microsoft知识库文章 - 99261


这应该适用于两个编译器,因为你正在制作win32控制台< br $> b $ b申请。


-


Elias


"里奇" < RI ********* @ yahoo.com>在消息中写道

news:3b ************************** @ posting.google.c om ...



我正在尝试清除程序中的屏幕。
我正在寻找适用于所有编译器的东西,尤其是
Borland& MS Visual Studio 6.
在Visual Studio中,我使用''system(" cls");''这样可以正常工作,但这对Borland不起作用。
在Borland我使用了''clrscr()''函数,它运行正常,但不适用于
Visual Studio。

是否有任何可以清除屏幕的内容,也许还有
在gcc上工作?
在Borland我想使用''easywin.exe'而不是控制台窗口
并清除屏幕。

我以为''系统( cls);''会用到这个吗?

任何想法?

提前致谢,Ritchie



ritchie写道:


我正在尝试清除我程序中的屏幕。
我正在寻找适用于所有程序的东西编译器,特别是Borland& MS Visual Studio 6。




由于您仔细阅读了常见问题解答,您现在知道这个

无法在标准C中完成。你可以来的最近的是:


put(&\\; \ n \\\\\\\\\\\ \\\\\\\\\\\\\ $>

你可能需要调整\ n计数。


毕竟,不要这样做。没有什么比通过imbecelic程序删除数据的无偿屏幕清除更令人烦恼

我想保持可见。


-

Chuck F(cb********@yahoo.com)(cb********@worldnet.att.net)

可用于咨询/临时嵌入式和系统。

< http://cbfalconer.home.att.net>使用worldnet地址!


CBFalconer写道:

由于您仔细阅读了常见问题解答,您现在知道了这个
不能在标准C中完成。关于你最接近的是:

puts(&\\; \\\\\\\\\\\\\\\\\\\\\\\ n \ n;

您可能需要调整\ n计数。


而且(如你所知)也不是一种便携式技术。

毕竟,不要这样做。没有什么比通过imbecelic程序删除数据的gratuitious屏幕清除更令人烦恼
我想保持可见。




清除屏幕没有错(通过它我的意思是当前的

终端窗口),只要他之后将旧数据放回去。 :-)


-

Richard Heathfield: biwel@eton.powernet.co.uk

Usenet是一个奇怪的地方。 - Dennis M Ritchie,1999年7月29日。

C FAQ: http://www.eskimo.com/~scs/C-faq/top.html

K& R答案,C书等:< a rel =nofollowhref =http://users.powernet.co.uk/etontarget =_ blank> http://users.powernet.co.uk/eton


Hi,

I am trying to clear the screen in my program.
I am loking for something that will work on all compilers, especially
Borland & MS Visual Studio 6.
On Visual studio I used ''system("cls");'' and this works fine but this
won''t work for Borland.
On Borland I used ''clrscr() '' function and it worked ok, but not for
Visual Studio.

Is there anything that will clear the screen in both and maybe also
work on gcc?
In Borland I want to use ''easywin.exe'' instead of the console window
and clear the screen.

I thought that ''system("cls");'' would work with this?

Any ideas?

Thanks in advance,
Ritchie

解决方案

Search for "Microsoft Knowledge Base Article - 99261"

That should work on both compilers given that you''re making a win32 console
application.

--

Elias

"ritchie" <ri*********@yahoo.com> wrote in message
news:3b**************************@posting.google.c om...

Hi,

I am trying to clear the screen in my program.
I am loking for something that will work on all compilers, especially
Borland & MS Visual Studio 6.
On Visual studio I used ''system("cls");'' and this works fine but this
won''t work for Borland.
On Borland I used ''clrscr() '' function and it worked ok, but not for
Visual Studio.

Is there anything that will clear the screen in both and maybe also
work on gcc?
In Borland I want to use ''easywin.exe'' instead of the console window
and clear the screen.

I thought that ''system("cls");'' would work with this?

Any ideas?

Thanks in advance,
Ritchie



ritchie wrote:


I am trying to clear the screen in my program.
I am loking for something that will work on all compilers,
especially Borland & MS Visual Studio 6.



Since you carefully read the FAQ, you are now aware that this
cannot be done in standard C. About the closest you can come is:

puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n");

and you may need to adjust the \n count.

After all that, don''t do it. There is nothing more annoying than
gratuitious screen clearings from imbecelic programs removing data
I want to remain visible.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


CBFalconer wrote:

Since you carefully read the FAQ, you are now aware that this
cannot be done in standard C. About the closest you can come is:

puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n");

and you may need to adjust the \n count.
And that (as you know) isn''t a portable technique either.

After all that, don''t do it. There is nothing more annoying than
gratuitious screen clearings from imbecelic programs removing data
I want to remain visible.



Nothing wrong with clearing the screen (by which I really mean the current
terminal window), as long as he puts the old data back afterwards. :-)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


这篇关于ANSI清晰屏幕[MS&amp; Borland公司]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆