import tkinter as tk
def disable_event():
# 閉じるボタン(X)を無効化ニダ
pass
# メインウィンドウの作成ニダ
root = tk.Tk()
root.title("Message")
# 画面サイズを取得ニダ
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
# 全画面表示に設定(最前面、枠なし)ニダ
root.attributes('-fullscreen', True)
root.attributes('-topmost', True)
# 背景を黒、文字を白に設定ニダ
root.configure(bg='black')
# 文字を表示するラベルニダ(エラー箇所を修正)
label = tk.Label(
root,
text="by野津手秀有",
font=("MS Gothic", 72, "bold"),
fg="white",
bg="black"
)
label.pack(expand=True)
# 終了操作(Alt+F4や閉じるボタン)を無効化ニダ
root.protocol("WM_DELETE_WINDOW", disable_event)
# プログラムを実行ニダ
root.mainloop()
To embed this project on your website, copy the following code and paste it into your website's HTML: