#include<stdlib.h>
#include<graphics.h>
char a[100]="zhangyafei"
char b[100]
char str[100]=""
int p=1
int i
void main()
{
int gdriver=DETECT, gmode
initgraph(&gdriver, &gmode, " ")
randomize()
do
{
while(!kbhit())
{
i++
if(i==300)
{
i=0
cleardevice()
}setcolor(rand()%16)
circle(rand()%600,rand()%450,rand()%50)
setcolor(rand()%16)
moveto(rand()%getmaxx(),rand()%getmaxy())
lineto(rand()%getmaxx(),rand()%getmaxy())
/*
setbkcolor(rand()%16)
sleep(1)
*/setcolor(rand()%16)
arc(rand()%getmaxx(),rand()%getmaxy(),rand()%getmaxx(),rand()%360,rand()%360) }
cleardevice()
setcolor(6)
settextstyle(0,0,3)
outtextxy(80,getmaxy()/2,"Please Input Password!")
scanf("%s",&b)
cleardevice()
if(strcmp(a,b))
{
p=1
outtextxy(100,getmaxy()/2,"Password is Wrong!")
sleep(1)
}
else
{
p=0
outtextxy(100,getmaxy()/2,"Password is Correct")
sleep(1)
}
}
while(p)
closegraph()
return 0
}
较简单的是用MFC编一个屏缓瞎幕上画图程散哪丛序,测定屏幕大小,图框内缘尺寸要大于屏幕大小,这样显示出来就是full screen. 生成的可执行程序扩冲樱展名用 .scr把它装入系统,选屏保程序时选它 就可以了。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)