-
Notifications
You must be signed in to change notification settings - Fork 281
Tips and tricks
Pierre Champion edited this page Sep 21, 2019
·
18 revisions
On the Windows OS the console keep showing and disappearing when using Dart Process?
Place the following hide-cmd_windows.go
file into the go/cmd/
directory:
package main
// the file hide-cmd_windows.go is used to hide console windows that keep
// showing up on each Dart Process.run calls
import "github.com/gonutz/w32"
func init() {
console := w32.GetConsoleWindow()
if console != 0 {
_, consoleProcID := w32.GetWindowThreadProcessId(console)
if w32.GetCurrentProcessId() == consoleProcID {
w32.ShowWindowAsync(console, w32.SW_HIDE)
}
}
}