猫史档案馆


【Python作品分享】新的作品【作品秀】

用户:天利A天利A查看:1 回复:5 评论:1 创建时间:2020-03-31T21:30:35


【作品展示】

center_image

 

【作品介绍】

rr

 

【作品源代码】

import tkinter as tk
import random
import threading
import time
def dow():
    window = tk.Tk()
    width=window.winfo_screenwidth()
    height=window.winfo_screenheight()
    a=random.randrange(0,width)
    b=random.randrange(0,height)
    window.title('祝你生日快乐!')
    window.geometry("200x50"+"+"+str(a)+"+"+str(b))
    tk.Label(window,
        text='在你生日快乐!',    # 标签的文字
        bg='Yellow',     # 背景颜色
        font=('楷体', 17),     # 字体和字体大小
        width=15, height=2  # 标签长宽
        ).pack()    # 固定窗口位置
    window.mainloop()

threads = []
for i in range(100000000):  # 需要的弹框数量
    t = threading.Thread(target=dow)
    threads.append(t)
    time.sleep(0.1)
    threads[i].start()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
白泽15白泽15

666

点赞0


评论


HY_夕止(已黑化)HY_夕止(已黑化)

NB!

 

点赞0


评论


沉著的飞叶龙uZWJ沉著的飞叶龙uZWJ

你喵……把我电脑整卡了……

点赞0


评论


無一郎無一郎

emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_点赞emotion_编程猫_点赞emotion_编程猫_点赞

点赞2


评论


蒟蒻OIer1048576蒟蒻OIer1048576

666

emotion_编程猫_点赞emotion_编程猫_加油

点赞0


评论