運行時彈出界面
當(dāng)點擊“不要”時彈出
當(dāng)點擊“×”時彈出
文章來源:http://www.zghlxwxcb.cn/news/detail-785683.html
環(huán)境需求
- python3.11.4及以上版本
- PyCharm Community Edition 2023.2.5
- pyinstaller6.2.0(可選,這個庫用于打包,使程序沒有python環(huán)境也可以運行,如果想發(fā)給好朋友的話需要這個庫哦~)
【注】文章來源地址http://www.zghlxwxcb.cn/news/detail-785683.html
- python環(huán)境搭建請見:https://want595.blog.csdn.net/article/details/134586653
- pyinstaller使用教程見:https://want595.blog.csdn.net/article/details/134106807
完整代碼
import tkinter as tk
import tkinter.messagebox
root = tk.Tk()
root.title('?')
root.resizable(0, 0)
root.wm_attributes("-toolwindow", 1)
screenwidth = root.winfo_screenwidth()
screenheight = root.winfo_screenheight()
widths = 300
heights = 100
x = (screenwidth - widths) / 2
y = (screenheight - heights) / 2
root.geometry('%dx%d+%d+%d' % (
到了這里,關(guān)于Python無法拒絕的表白界面完整代碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!