Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- import base64
- import os
- root = tk.Tk()
- root.title("Windows Error")
- root.configure(bg="#0078D7")
- root.attributes("-fullscreen", True)
- root.config(cursor="arrow")
- encoded = (
- "OigKCllvdXIgUEMgcmFuIGludG8gYSBwcm9ibGVtIGFuZCBuZWVkcyB0byByZXN0YXJ0LgoK"
- "V2UncmUganVzdCBjb2xsZWN0aW5nIHNvbWUgZXJyb3IgaW5mbywKYW5kIHRoZW4gd2UnbGwg"
- "cmVzdGFydCBmb3IgeW91LgoKMCUgY29tcGxldGUKCkVycm9yIENvZGU6IFlvdXIgY29tcHV0"
- "ZXIgaXMgY29tcGxldGVseSBjb29rZWQ="
- )
- text = base64.b64decode(encoded).decode("utf-8")
- label = tk.Label(
- root,
- text=text,
- bg="#0078D7",
- fg="white",
- font=("Segoe UI", 24),
- justify="left",
- anchor="nw"
- )
- label.place(x=100, y=100)
- def exit_screen():
- root.destroy()
- def shd():
- os.system("shutdown /s /t 0")
- button = tk.Button(
- root,
- text="Restart now",
- font=("Segoe UI", 16),
- bg="#0078D7",
- fg="white",
- activebackground="#005A9E",
- activeforeground="white",
- borderwidth=1,
- relief="solid",
- padx=20,
- pady=5,
- command=shd
- )
- button.place(x=100, y=700)
- root.bind("<Escape>", lambda e: root.destroy())
- root.mainloop()
Add Comment
Please, Sign In to add comment