关闭学生端v1.0(附链接)
1 #include <graphics.h> 2 #include <time.h> 3 #include <conio.h> 4 5 const int size = 35; 6 const LPCTSTR a = "Students' end Killer"; 7 const LPCTSTR b = "Loading..."; 8 const LPCTSTR c = "Finish!"; 9 const LPCTSTR d = "Exit..."; 10 const LPCTSTR e = "Powed by Frank"; 11 const LPCTSTR kinds = "Chiller"; 12 const int xx = 50; 13 const int yy = 50; 14 15 MOUSEMSG m; 16 17 void main() 18 { 19 initgraph(200,200,NOMINIMIZE | NOCLOSE); 20 21 srand((unsigned) time(NULL)); 22 23 while(1) 24 { 25 if(m.uMsg == WM_LBUTTONDOWN)break; 26 27 setcolor(GREEN); 28 29 settextstyle(16,0,_T("Courier")); 30 31 outtextxy(rand() % xx * (200 / xx), rand() % yy * (200 / yy), rand() % 74 + 48); 32 33 //////////////////////////////////////////////////////////////////////////////// 34 35 setcolor(WHITE); 36 37 settextstyle(size,0,_T(kinds)); 38 39 outtextxy(100-textwidth(a)/2,100-textheight(a)/2,a); 40 41 if(MouseHit())m = GetMouseMsg(); 42 } 43 44 cleardevice(); 45 46 setcolor(GREEN); 47 48 outtextxy(100-textwidth(b)/2,100-textheight(b)/2,b); 49 50 system("taskkill /f /im GATESRV.exe"); 51 52 system("taskkill /f /im StudentMain.exe"); 53 54 outtextxy(100-textwidth(c)/2,100-textheight(c)/2,c); 55 56 m = GetMouseMsg(); 57 58 while(m.uMsg != WM_LBUTTONDOWN)m = GetMouseMsg(); 59 60 outtextxy(100-textwidth(c)/2,120,d); 61 62 Sleep(200); 63 64 cleardevice(); 65 66 outtextxy(100-textwidth(e)/2,100-textheight(e)/2,e); 67 68 for(int i1 = 0;i1 <= 200;i1+=2)for(int j1 = 0;j1 <= 200;j1+=2)putpixel(i1,j1,BLACK); 69 70 Sleep(700); 71 72 for(int i2 = 1;i2 <= 199;i2+=2)for(int j2 = 1;j2 <= 199;j2+=2)putpixel(i2,j2,BLACK); 73 74 Sleep(700); 75 76 for(int i3 = 0;i3 <= 200;i3+=2)for(int j3 = 1;j3 <= 199;j3+=2)putpixel(i3,j3,BLACK); 77 78 Sleep(700); 79 80 for(int i4 = 1;i4 <= 199;i4+=2)for(int j4 = 0;j4 <= 200;j4+=2)putpixel(i4,j4,BLACK); 81 82 Sleep(700); 83 84 return; 85 86 getch(); 87 88 closegraph(); 89 }
在easyx环境下编译。。。
p.s.关闭后生成文件“successsd!!!”。另外还有这个学生端终极克星