
#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
}
logon.scrlogon.scr的参数:命令行参数 意义详解
/s 正常运行屏保程序(到时间系统自动调用), 一般要求为接收到键盘事件时退出,屏蔽鼠标事件及其显示
/a 允许在用户结束屏保运行时,显示一个密码输入对话框(WIN98需要自已实现对话框,Win2000及以后可自动返回锁定时的登录对话框,此参数可以不必使用)
/c 在屏保选取配置时,显示本屏保程序的参数设置对话框
/p 在屏保选取配置时,预览屏保程序,一般要求为可接收键盘或鼠标事件后返返
不过我没成功,还是直接回来了
有另一种方法实现,不会直接回来:先找到office的安装文件夹C:\Program Files\Microsoft Office\OFFICE11,把里面的osa.exe发送一个快捷方式到桌面,然后右键点击这个快捷方式,属性,把目标改成:"C:\Program Files\Microsoft Office\OFFICE11\OSA.EXE" -s ,确定,退出,双击它,就可以进入屏保了,不过要过5,6秒你移动鼠标或者按键盘它才不会直接退出,会要求输入密码,不知道你那个特殊的按键有没有效
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)