鱼C论坛

 找回密码
 立即注册
查看: 1819|回复: 4

[已解决]大神们,我创建了一个界面,怎么关闭这个界面啊┭┮﹏┭┮

[复制链接]
发表于 2017-10-20 17:13:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. import easygui as f
  2. import sys
  3. import random
  4. image = ['',('C:\\Users\\Administrator\\Desktop\\唯美gif\\1_1.gif'),
  5.             ('C:\\Users\\Administrator\\Desktop\\唯美gif\\1_2.gif'),
  6.             ('C:\\Users\\Administrator\\Desktop\\唯美gif\\191600036a49c167ff2f.gif'),
  7.              ('C:\\Users\\Administrator\\Desktop\\唯美gif\\20140221_0849868a1540cbb51000sAhClCfLagfc.gif'),
  8.              ('C:\\Users\\Administrator\\Desktop\\唯美gif\\3448054951011226260_500x281_210.gif'),
  9.              ('C:\\Users\\Administrator\\Desktop\\唯美gif\\6608499190027452196.gif')
  10.          ]
  11. title = '欢迎来到鱼油的第一个gui编程!'
  12. choices_00 = ('exit', 'regret')
  13. choices_01 =('Java','python','c#','c++')
  14. photos = 6
  15. secret = random.randint (1,photos)
  16. fields = ('account', 'password')
  17. personal_information = {}


  18. name = f.enterbox('请输入姓名:', title = title)
  19. information = f.multpasswordbox('请输入你要注册的账号和密码',title = title, fields =  fields, values = ())
  20. personal_information_new = {name :information}
  21. personal_information.update(personal_information_new)
  22. print (name + '的账号是:' +personal_information[name][0] + ';\n' + name + '的密码是:' +personal_information[name][1] + '.')

  23. while 1:
  24.     answer_1 = f.boolbox('你是来学习编程的吗?', title = title, image = image[secret] )
  25.     secret = random.randint (1,photos)
  26.     if answer_1 == 1:
  27.         f.msgbox ('请加我qq问我要教学文件', title = title, image = image[secret])
  28.         print ('他来学编程啦!')
  29.         language = f.buttonbox('你想学哪种语言???',title = title,image =  image[secret],choices = choices_01)
  30.         if language == choices_01[1]:
  31.             secret = random.randint (1,photos)
  32.             f.msgbox('你来对啦!!!恭喜哈',title = title, image = image[secret])
  33.             print('他选的' +  language + '语言')
  34.             break
  35.         else:
  36.             secret = random.randint (1,photos)
  37.             f.msgbox('不好意思,我只会python',title = title , image = image[secret])
  38.             print('他选的' +  language + '语言')
  39.             break
  40.     elif answer_1 == 0:
  41.         secret = random.randint (1,photos)
  42.         answer_11 = f.buttonbox ('请按按退出键结束', title = title, image = image[secret], choices = choices_00)
  43.         if answer_11 == 'exit':
  44.             print('他退出啦,真遗憾!')
  45.             break
  46.         else:
  47.             print('后悔啦,来学编程啦')
  48. input('请按任意键结束。')
  49.             
  50.         
  51.    
  52.             
复制代码



最佳答案
2017-10-20 21:09:44
在shell用ctrl+c试试
实在不行从任务管理器中删除
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2017-10-20 20:15:20 | 显示全部楼层
执行完了不就关了吗
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-10-20 21:09:44 | 显示全部楼层    本楼为最佳答案   
在shell用ctrl+c试试
实在不行从任务管理器中删除
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-10-20 21:20:18 | 显示全部楼层
界面没有关闭(x)的按钮吗
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2017-10-21 14:24:42 | 显示全部楼层
tich 发表于 2017-10-20 21:20
界面没有关闭(x)的按钮吗

有,但是没用


我记得好像用sys.exit()对吧
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-3-3 06:53

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表