Commit 51ee197c by BellCodeEditor

auto save

parent 9c34ad18
Showing with 102 additions and 2 deletions
import tkinter as tk
import random
import threading
import time
def dow():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('中毒了!')
window.geometry("200x50" +"+" +str(a) +"+" +str(b))
tk.Label(window,
text='电脑有病毒!',# 标签的文字
bg='Red',# 背景颜色
font=('楷体',17),# 字体和字体大小
width=15,height=2 # 标签长宽
).pack()# 固定窗口位置
window.mainloop()
threads = []
for i in range(100):# 需要的弹框数量
t = threading.Thread(target=dow)
threads.append(t)
time.sleep(0.1)
threads[i].start()
\ No newline at end of file
import tkinter as tk
import random
import threading
import time
def dow():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('中毒了!')
window.geometry("200x50" +"+" +str(a) +"+" +str(b))
tk.Label(window,
text='电脑有病毒!',# 标签的文字
bg='Red',# 背景颜色
font=('楷体',17),# 字体和字体大小
width=15,height=2 # 标签长宽
).pack()# 固定窗口位置
window.mainloop()
threads = []
for iin range(100):# 需要的弹框数量
t = threading.Thread(target=dow)
threads.append(t)
time.sleep(0.1)
threads[i].start()
\ No newline at end of file
...@@ -11,7 +11,9 @@ def command(): ...@@ -11,7 +11,9 @@ def command():
name=e1.get() name=e1.get()
password=e2.get() password=e2.get()
print(name," ",password) print(name," ",password)
if e2!=e3:
print("错误")
with open(r'C:)
# 输入框entry;用户输入框 # 输入框entry;用户输入框
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式
e1.place(x=140, y=80) e1.place(x=140, y=80)
...@@ -39,7 +41,7 @@ lab3= tkinter.Label(root, text='确认密码:', font=('宋体', 15), ...@@ -39,7 +41,7 @@ lab3= tkinter.Label(root, text='确认密码:', font=('宋体', 15),
fg="black") fg="black")
lab3.place(x=20,y=200) lab3.place(x=20,y=200)
lab4=tkinter.Button(root,text="完成",command=command) lab4=tkinter.Button(root,text="完成",command=command,width=20)
lab4.place(x=150,y=250) lab4.place(x=150,y=250)
# 保持窗口监听,进入消息循环 # 保持窗口监听,进入消息循环
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment