import tkinter as tk
import random
import threading
import time
import winsound
def boom():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('error')
window.geometry("400x100" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='error,来人shuishui我 ', bg='red',
font=('宋体', 17), width=40, height=4).pack()
winsound.MessageBeep(winsound.MB_ICONASTERISK)
window.mainloop()
def lu():
TK = tk.Tk()
width = TK.winfo_screenwidth()
height = TK.winfo_screenheight()
a = random.randrange(0, widt
有关多线程弹窗的一个代码实例(请注意设置的弹窗文字)
最新推荐文章于 2024-01-26 12:06:37 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)