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

Fabien Bodard gambas.fr at ...626...
Mon Jan 30 11:25:19 CET 2012


2012/1/27 Jussi Lahtinen <jussi.lahtinen at ...626...>:
> Screen.Height should return the actual screen height.
>
> Jussi
>
>
>
> On Fri, Jan 27, 2012 at 12:13, abbat <abbat.81 at ...787...> wrote:
>
>>
>> This works, but it is WORKAREA.
>> If my resolutions is 1280 x 1024 and panel has 26 px and situated below,
>> Then Desktop.Height = (1024-26)
>>
>>
>> Benoît Minisini wrote:
>> >
>> > 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
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Try before you buy = See our experts in action!
>> > The most comprehensive online learning library for Microsoft developers
>> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> > Metro Style Apps, more. Free future releases when you subscribe now!
>> > http://p.sf.net/sfu/learndevnow-dev2
>> > _______________________________________________
>> > Gambas-user mailing list
>> > Gambas-user at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-know-Height-and-Width-of-screen--tp33187109p33213054.html
>> Sent from the gambas-user mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

you need to use screens (Benoit is tired)

Screens[0].Height return the full height
Screens[0].AVailableheight return the height minus the panels

etc

http://gambasdoc.org/help/comp/gb.qt4/screen?v3



-- 
Fabien Bodard




More information about the User mailing list