import tkinter as tk
window = tk.Tk()
window.title('逻辑峰')
window.geometry('450x300')
print("电脑的分辨率是%dx%d" % (window.winfo_screenwidth(), window.winfo_screenheight()))
window.update()
print("窗口的分辨率是%dx%d" % (window.winfo_width(), window.winfo_height()))
window.config(background="#6fb765")
window.attributes('-topmost', True)
window.attributes('-alpha', 1)
window.maxsize(600, 600)
window.minsize(50, 50)
window.iconbitmap('../image/icon.ico')
text = tk.Label(window, text="逻辑峰", bg="yellow", fg="red",
font=('Times', 15, 'bold italic underline'))
text.pack()
button = tk.Button(window, text="关闭", command=window.quit)
button.pack(side="bottom")
window.mainloop()