测试安装了下 Python, 语法真精简。怪不得现在很流行:
下载:https://www.python.org/downloads/
下载VS2012的一个IDE扩展插件PTVS: https://github.com/Microsoft/PTVS 或者用nuget搜需PTVS下载安装
先需要设插件的环境选项。
测试显示个窗口加了个按钮:
#!/usr/bin/python # -*- coding: UTF-8 -*- from tkinter import * # 导入 Tkinter 库 from tkinter import messagebox #对应着tkinter文件夹底下的messagebox.py from tkinter.messagebox import * top = Tk() top.geometry("500x200") def helloCallBack(): showinfo( "Hello Python", "Hello Runoob") # B = Button(top, text ="clicke me", fg="red",bg="blue",command = helloCallBack) B = Button(top, text ="clicke me",command = helloCallBack) B.pack() top.mainloop();