mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
docs: add guide to hide spawned windows
This commit is contained in:
@@ -51,4 +51,21 @@ Also, you should specify path to fixed version of webview2 runtime in the `windo
|
||||
})
|
||||
```
|
||||
|
||||
Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime.
|
||||
Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version
|
||||
mismatch or invalid path to a runtime.
|
||||
|
||||
## Spawning other programs
|
||||
|
||||
When spawning other programs, such as scripts, you will see the window appear on the screen. To hide the window,
|
||||
you can use the following code:
|
||||
|
||||
```go
|
||||
cmd := exec.Command("your_script.exe")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
HideWindow: true,
|
||||
CreationFlags: 0x08000000,
|
||||
}
|
||||
cmd.Start()
|
||||
```
|
||||
Solution provided by [sithembiso](https://github.com/sithembiso) on the
|
||||
[discussions board](https://github.com/wailsapp/wails/discussions/1734#discussioncomment-3386172).
|
||||
Reference in New Issue
Block a user