lolimoska

Untitled

Aug 27th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import tkinter as tk
  2. import threading
  3.  
  4. def Destroy():
  5. root.destroy()
  6.  
  7. def TextOnWindow():
  8. global root
  9. root = tk.Tk()
  10. label = tk.Label(root, text='Text on the screen',
  11. font=('Times New Roman','80'), fg='black', bg='white')
  12. label.pack()
  13. root.overrideredirect(True)
  14. root.geometry("+250+250")
  15. root.wm_attributes("-topmost", True)
  16. root.wm_attributes("-disabled", True)
  17. root.wm_attributes("-transparentcolor", "white")
  18. root.mainloop()
  19.  
  20. while True:
  21. i = input('Test ')
  22. if i == '1':
  23. x = threading.Thread(target=TextOnWindow)
  24. x.start()
  25. if i == '0':
  26. des = threading.Thread(target=Destroy)
  27. des.start()
Add Comment
Please, Sign In to add comment