手机分类
  导航: 电脑时代在线 · 程序设计 · C语言 · C语言编程实例
有问题吗?看 疑难解答 电脑术语

文本模式模仿磁盘扫描外观

 
硬件盘点
手机推荐
 
『文本模式模仿磁盘扫描外观』如果文章有大量图片,显示会较慢,请等待图片下载完成
 
点击数: 更新时间:2005-6-7 

程序很简单,主要是把光标藏起来了,练习下文本模式下的作图.

#include "conio.h"
#include "stdlib.h"
 main()
{int i,j;
 clrscr();
 randomize();
 textcolor(BLUE);
 textbackground(BLUE);
 for(i=1;i<=25;i++)
 for(j=1;j<=80;j++)
 {
 gotoxy(j,i);
 cprintf(" ");
 }
 gotoxy(6,3);
 textcolor(11);
 cprintf("Microsoft Scan Disk");
 gotoxy(6,5);
 for(i=1;i<70;i++)
 cprintf("%c",196);
 gotoxy(6,7);
 cprintf("Because Windows is not properly shut down,");
 gotoxy(6,9);
 cprintf("one or more if disk drives may have errors on it.");
 gotoxy(6,19);
 textcolor(7);
 textbackground(12);
 cprintf("%cExit%c",17,16);
 textbackground(BLUE);
 textcolor(11);
 gotoxy(6,21);/*上半部分主要就是写写字改改颜色*/
 for(i=0;i<70;i++)
 cprintf("%c",196);
 gotoxy(16,22);
 textcolor(YELLOW);
 for(i=0;i<60;i++)
 cprintf("%c",176);
 gotoxy(16,22);
 for(i=0;i<60;i++)
 {
 textcolor(YELLOW);
 gotoxy(i+16,22);
 cprintf("%c",219);
 textcolor(11);
 gotoxy(6,22);
 cprintf("%d%%",(i+1)*100/60);/*输出百分率*/
 gotoxy(i+15,22);/*隐藏光标*/
 j=random(5000)+4000;
 delay(j);
 }
 getch();
}

 


如果您有什么疑问,可以至论坛提出或者解答他人的疑问   返回页面顶部

】【关闭窗口
·上一篇教程:
·下一篇教程:
·导航: 电脑时代在线 · 程序设计 · C语言 · C语言编程实例
相关文章
 
搞笑自拍|图片故事|美女图库|体坛宝贝|明星爆料|世界奇观|风光摄影|历史回忆|大千世界
Photshop超炫图片
advertisement
关于站点 - 广告服务 - 联系我们 - 版权隐私 - 免责声明 - 合作伙伴 - 程序支持 - 网站地图 - 返回顶部  
网站文本地图
  版权所有:电脑时代在线 2005-2007 欢迎各种媒体转载我们的原创作品[转载请注明出处]
copyright © 2005-2007 www.PCvz.com online services. all rights reserved. 蜀ICP备05015578
Template designed by LaoJiang. Optimized for 1024x768 to Firefox,Opera and MS-IE. Site powered by EQL.
红盾
热爱电脑,热爱生活
拥有电脑,拥有生命
让我们享受拥有电脑的时光