用户:
天利A查看:1 回复:5 评论:1 创建时间:2020-03-31T21:30:35
【作品展示】

【作品介绍】
rr
【作品源代码】
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='Yellow', # 背景颜色
font=('楷体', 17), # 字体和字体大小
width=15, height=2 # 标签长宽
).pack() # 固定窗口位置
window.mainloop()
threads = []
for i in range(100000000): # 需要的弹框数量
t = threading.Thread(target=dow)
threads.append(t)
time.sleep(0.1)
threads[i].start()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn