import tkinter as tk
root = tk.Tk()
# root.titie("正常显示标题") # 显示标题
# root.attributes("-toolwindow",1) # 只显示关闭按钮,不显示最小化和最大化
root.overrideredirect(True) # 工具栏全部不显示
# root.protocol('WM_DELETE_WINDOW', no_mac_limit_use)
screenWidth = root.winfo_screenwidth()
screenHeight = root.winfo_screenheight()
ww, wh = 445, 75
root.geometry('%dx%d+%d+%d' % (ww, wh, (screenWidth - ww) / 2, (screenHeight - wh) / 2 - 200))
notice = tk.StringVar()
mac_entry = tk.StringVar()
notice.set('程序未授权,请将MAC地址发给管理员获取授权')
now_mac = YOUR_MAC
mac_entry.set(now_mac)
tk.Entry(root, justify='center', width='40', fg='red', textvariable=notice, font=('', '14', 'bold')).grid(row=0, column=0, rowspan=1, columnspan=2)
tk.Entry(root, justify='center', width='40', fg='red', textvariable=mac_entry, font=('', '14', 'bold')).grid(row=1, column=0, rowspan=1, columnspan=2)
tk.Button(root, width='15', text="退 出", command=function_exit).grid(row=2, column=0)
tk.Button(root, text="msg", command=function_youwant).grid(row=2, column=1)
root.mainloop()