import multiprocessing
import tkinter as tk
import threading
from tkinter import ttk
from time import sleep
import random
def dow():
window=tk.Tk()
width=window.winfo_screenwidth()
height=window.winfo_screenheight()
a=random.randrange(0,width-250)
b=random.randrange(0,height-50)
window.title('病毒')
window.geometry('250x50'+'+'+str(a)+'+'+str(b))
tk.Label(window,text='您的电脑已被入侵',bg='red',font=('simhei.ttf',22),width=128,height=2).pack()
window.mainloop()
if __name__ == "__main__":
pool=multiprocessing.Pool(30)
for i in range(20):
pool.apply_async(dow,(i,))
pool.close()
pool.join()