1 Star 0 Fork 9

fuyoo / GoMiniblink

forked from aochulai / GoMiniblink 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
window.go 762 Bytes
一键复制 编辑 原始数据 按行查看 历史
fuyoo 提交于 2020-11-18 17:41 . 修改导出包
package main
import (
"fmt"
fm "gitee.com/fuyoo/GoMiniblink/forms"
cs "gitee.com/fuyoo/GoMiniblink/forms/controls"
"gitee.com/fuyoo/GoMiniblink/forms/windows"
"unsafe"
)
func main() {
fmt.Println("x64 is", unsafe.Sizeof(uintptr(0)) == 8)
cs.App = new(windows.Provider).Init()
cs.App.SetIcon("app.ico")
frm := new(cs.Form).Init()
frm.SetTitle("this is form")
frm.SetSize(600, 600)
ctrl := new(cs.Control).Init()
ctrl.SetSize(300, 300)
ctrl.SetLocation(100, 100)
ctrl.SetBgColor(0x2FAEE3)
ctrl.EvMouseClick["show_pos"] = func(s cs.GUI, e *fm.MouseEvArgs) {
fmt.Println(s.GetHandle(), e.X, e.Y)
}
frm.AddChild(ctrl)
frm.EvMouseClick["show_pos"] = func(s cs.GUI, e *fm.MouseEvArgs) {
fmt.Println(s.GetHandle(), e.X, e.Y)
}
cs.Run(frm)
}
Go
1
https://gitee.com/fuyoo/GoMiniblink.git
git@gitee.com:fuyoo/GoMiniblink.git
fuyoo
GoMiniblink
GoMiniblink
v1.0.2

搜索帮助

53164aa7 5694891 3bd8fe86 5694891