聘我网

新概念招聘3.0

最高效的编写winform程序方式

vote up0vote downstar

首先下载并安装AutoHotkey InstallerSmartGUI Creator

然后用SmartGUI Creator进行表格设计,再存为.ahk程序,

最后双击即可运行,而如果以文本方式打开则可以研究其代码。

贴一段最简单的程序以及截图:

Gui, Add, Text, x17 y8 w120 h20, Your Name:
Gui, Add, Text, x17 y38 w120 h20, Your Year of bIrth (yyyy):
Gui, Add, Edit, x157 y8 w100 h20 vName, Name
Gui, Add, Edit, x157 y38 w100 h20 vYear, yyyy
Gui, Add, Button, x27 y68 w70 h20, OK
Gui, Add, Button, x177 y68 w70 h20, Cancel
Gui, Show, x279 y217 h98 w277, Generated using SmartGUI Creator
Return

ButtonCancel:
GuiClose:
ExitApp

ButtonOk:
Gui, submit
Age = %a_yEar% ;%a_year% holds the current year
Age -= %Year%   ; %year% holds the year submitted by user
Msgbox, Hey %name%! You're %Age% years old now!

截图:

alt text

 

1 个答复

vote up0vote down

In awe of that asnwer! Really cool!

链接

您的回答





不是您要找的问题? 浏览其他含有标签 的问题或者 自己问个.