golang win可执行文件不显示命令窗口代码

1 package main import "github.com/gonutz/w32" func main() { console := w32.GetConsoleWindow() if console != 0 { _, consoleProcID := w32.GetWindowThreadProcessId(console) if w32.GetCurrentProcessId() == consoleProcID { w32.ShowWindowAsync(console, w32.SW_HIDE) } } }

 

posted @ 2022-08-07 09:18  鸡儿er  阅读(231)  评论(0编辑  收藏  举报