[Gambas-user] How to know Height and Width of screen?

Benoît Minisini gambas at ...1...
Mon Jan 23 12:46:37 CET 2012


Le 23/01/2012 12:32, abbat a écrit :
>
>
> in VB.NET I get it by this way:
>
> Dim yy As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
> Dim xx As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
>
> How to do it in Gambas 3?
>
> Thanks

Desktop.Width / Desktop.Height or Desktop.AvailableWidth / 
Desktop.AvailableHeight.

If you need a specific screen, you must use the Screens class.

Screens[<screen number].{Available}{X | Y | Width | Height}

So it's almost the same thing, with less characters to type. :-)

-- 
Benoît Minisini




More information about the User mailing list