2025年3月28日 星期五 甲辰(龙)年 月廿七 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 编程开发 > C语言

c语言+API实现恶作剧程序

时间:12-30来源:作者:点击数:251

恶作剧一:鼠标禁锢:

  • #include<windows.h>
  • #pragma comment(linker,"/subsystem:\"Windows\" /entry:\"mainCRTStartup\"")
  • void main()
  • {
  • int x,y;
  • while(1)
  • {
  • x=1;
  • y=1;
  • SetCursorPos(x,y);
  • }
  • return ;
  • }

恶作剧二:鼠标乱抖:

  • #include<windows.h>
  • #include<stdio.h>
  • #pragma comment(linker,"/subsystem:\"Windows\" /entry:\"mainCRTStartup\"")
  • void main()
  • {
  • int x,y;
  • while(1)
  • {x=rand()%801;
  • y=rand()%601;
  • SetCursorPos(x,y);
  • }
  • return ;
  • }

 

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门