GUI/Maximum window dimensions: Difference between revisions

Added Go
m (→‎Windows: Remove vanity tags)
(Added Go)
Line 295:
1920
1055
</pre>
 
=={{header|Go}}==
{{libheader|RobotGo}}
<lang go>package main
 
import (
"fmt"
"github.com/go-vgo/robotgo"
)
 
func main() {
w, h := robotgo.GetScreenSize()
fmt.Printf("Screen size: %d x %d\n", w, h)
fpid, err := robotgo.FindIds("firefox")
if err == nil && len(fpid) > 0 {
pid := fpid[0]
robotgo.ActivePID(pid)
robotgo.MaxWindow(pid)
_, _, w, h = robotgo.GetBounds(pid)
fmt.Printf("Max usable : %d x %d\n", w, h)
}
}</lang>
 
On my machine the figures are:
<pre>
Screen size: 1366 x 768
Max usable : 1301 x 744
</pre>
 
9,476

edits